Similar Posts

Subscribe
Notify of
3 Answers
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
JanaL161
10 months ago

How the procedures work, you can find on the Internet. For example: https://de.wikipedia.org/wiki/Vigen%C3%A8re-Chiffre (even with pseudocode)

With your general knowledge of the language you work with, you should be able to implement the researched procedures.

NoArtFX
10 months ago

I don't know the algorithms except the Caesar encryption, but find out very quickly online.

However, since you do not want to implement them anyway, here is the procedure for the algorithm and the implementation in the (pseudo) code

The Caesar wears a letter shift. Thus, a shift of 3 letters would then be a becomes d, b to e, c to f and so on. The decryption pushes back the bucks.

 func enc(String text, int shift) for (char c: text) CharCode(c) + shift return text func dec(String text, int shift) for (char c: text) CharCode(c) - shift return text

It's simple. "Overflows" are not implemented here. So z becomes a, for that you have to optimize this naturally with Modulo, so if we only take small letters a – z into the alphabet, then you can perform a mod 27 because a shift of 27 letters is again the exact same letter in the alphabet. 28 is simply a shift by 1.