I have a class that encrypts and decrypts a string. It uses rijndael. Anyways, I am trying to store an encrypted value on the client. That works all fine and dandy. My problem is when I want to decrypt the value, I need the Key and IV(InitVector) that was used to encrypt the string. They are byte[] values. I currently output those to the client through a javascript variable. I need them when I call a service, as this app talks to a mainframe and it needs the users credentials. They output to the client in the form of var vector = [143,147,31,70,195,72,228,190,152,222,65,240,152,183,0,161]; I am able to pass that value to my service as a string. My question is , inside my service, how can I convert this string back into a byte array? I have tried Encoding.ASCII.GetBytes("[143,147,31,70,195,72,228,190,152,222,65,240,152,183,0,161]"); but that is not what I want. That tries to make a new Byte[] from that string value. I need a byte array who's values are that inside the string. Is this possible? Please provide a quick sample if you know how to do this.
Thanks, ~ck in San Diego