I want to save the date in encrypted format
You must use the binary format. Encrypted data cannot be stored in a string. It will be randomly damaged when the string is normalized, and not every byte value is valid Unicode code. If you absolutely want a string, you need to encode the data Convert.ToBase64String ().
source
share