How to encrypt string in c++?

Hello. There are some std::stringconsisting of letters and numbers.
You need to make the function of encryption and decryption of these lines.
Help, please. Suitable option just note as a reply :3
June 10th 19 at 14:23
3 answers
June 10th 19 at 14:25
Solution
Any string of their letters and numbers.
A27B98C
Translate the letters into numbers, numbering from 0.
0 27 1 98 2 - 0271982 (this is key)
Now take the string you want to encrypt.
C12B35A
Also, translate the letters into numbers.
2 12 1 35 0 - 2121350 (this is text)

TEXT + KEY = CIPHER (3403278)

Simple: the Caesar Cipher.(it's like a salad, but cipher)
June 10th 19 at 14:27
Solution
June 10th 19 at 14:29
Solution
If it is important that the encrypted string cannot be decrypted without a key, use proven encryption algorithms, such as Salsa20.

Find more questions by tags C++