I can't Google anything on CipherMode.ECB or PaddingMode.PKCS7. In a simple test such as:
String^ plainText = "See if this code works";
String^ encCode = "abdg64hrUHGF5rEW";
String^ encText = encryptStr(plainText, encCode, false);
String^ decryptedText = decryptStr(encText, encCode, false);
My string comes back with a few odd characters at the beginning of the string that are NOT correct and then part of the original string is returned correctly. I don't know if it has anything to do with these properties I cannot seem to set.
Here are the calls I am making with the mysterious properties commented out:
BTW - I just tested the hash and they both do the same thing: they mess up the first 8 characters and then get the rest of the string correct. 8 ... hmmmmmmmm
THE ANSWER:
This is a syntax error - why the compiler doesn't point it out is beyond me.
Here is the offending code:
tdes->Mode = CipherMode.ECB;