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
Any string of their letters and numbers.
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.
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
June 10th 19 at 14:29
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++