Last post Feb 02, 2014 09:25 PM by BrockAllen
Feb 02, 2014 07:46 PM|abcpqr|LINK
I am trying to decrypt an encoded encrypted value. But it is not returning the unencrypted value. I am using DES algorithm.
Can someone please help me with this?
string Decrypt(string encryptedString)
bytes = CreateKey();
("The string which needs to be decrypted can not be null.");
cryptoProvider = new
MemoryStream memoryStream =
CryptoStream cryptoStream =
StreamReader reader =
Feb 02, 2014 08:56 PM|BrockAllen|LINK
If CreateKey creates a new key, then it makes sense that you can't decrypt a value previously encrypted with a different key.
Feb 02, 2014 09:03 PM|abcpqr|LINK
it is the same Key which is used for encryption.
Feb 02, 2014 09:19 PM|BrockAllen|LINK
Ok, not sure the issue, but here's a crypto sample that might help compare:
Feb 02, 2014 09:22 PM|abcpqr|LINK
Is this for DES encryption/Decryption?
Feb 02, 2014 09:25 PM|BrockAllen|LINK
It uses AES, but you should be able to substitute.