If I understand your requirement correctly, one option is to use Convert.ToBase64String( byte[] ) to convert the byte array to a base 64 string, and then Convert.FromBase64String( string ) to convert it back to a byte array. These conversions will preserve the integrity of the original byte array.
Andy Mc -----Original Message----- From: Dinesh Upare [mailto:[EMAIL PROTECTED]] Sent: 21 June 2002 15:58 To: [EMAIL PROTECTED] Subject: [DOTNET] Decrypting Encrypted String ? I am trying to encrypt a string.After encrypting string I get byte array, I am converting the byte array to string using UTF Encoding. But when I pass this string for decryption , i again convert the string into byte array butI get a error as a BAD DATA ERROR. <snip> You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.