I am a guy from C # who is desperately trying to learn C ++ and move the old code. So far, everything is in order, but the following method has guarded me. If anyone could give me some pointers (sorry for the pun), I would be grateful.
C # Method:
public static string crappyEncryption(String userKey) { StringBuilder eStr = new StringBuilder(); String key1 = "somehorriblelongstring"; String key2 = "someotherhorriblelongstring"; for (int i = 0; i < userKey.Length; i++) { eStr.Append(key2[key1.IndexOf(userKey[i])]); } return encodeTo64(eStr.ToString()); }
encodeTo64 is a local method that I decided in C ++. This weird method (if you're interested) was a small encryption method that I came up with so that we can use the mobile cross platform for non-essential string encryption.
Thank you very much
source share