AES encryption RRS feed

  • Question

  • User-168748142 posted

    I am using AES encryption to encrypt my data and using a shared key.

    I want to hard code the shared key. The shared key is a combination of numbers and alphabets and it has 32 characters.

    The problem is we have to pass a byte array only when we need to generate the key.

    How do I pass the key as it is without converting it to byte array?

    Am using C#.net 1.1.

    Any thoughts on this?

    Friday, August 10, 2007 4:07 PM


  • User-221752185 posted

    Why dont you convert it to base64 string, that way it is easily converted back into a byte array using System.Encoding.UTF8.GetBytes 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, August 10, 2007 5:03 PM