Many of the cryptography API examples I have run into use the CryptoStream class and file streams to encrypt/decrypt files.
I have been able to use file streams with the CryptoStream class successfully. However, in the scenario in which encrypted data is held in a string variable, I would like to use a MemoryStream in conjunction with the CryptoStream class to decrypt the encrypted string. In attempting this I have been getting a "Bad Data" error when the decryption takes place. Has anyone used memory streams with the CryptoStream class and is there some particular way in which the data must be loaded from a string variable into the memory stream in order to be in proper form to be operated on by the CryptoStream class?
Thanks,
Bill
William A. Caton III
Software Engineer
MAXIMUS
Atlanta, Ga.