Skip to content

How to store encrypted byte[] into database

Raju k

Asked Dec 19, 2006, 10:07 PM EST2 answers
Share
LinkedInX
Hi all,


I have a situation where I need to store the encrypted password in sql server database. I have encrypted using Rc2 algorithm, then I converted 'encrypted' byte[] to string and stored in database. But the problem is when I  converted this String field from database to byte[] and try to decrypt it using same algo, it is giving exception. I am confused wht to do. please help me any one?

Please help out I am waiting............

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • 0
    I don't know SQL Server but you do can't convert byte[] into string because you lost data in this convesion. You need to save the content of byte[] into your database as byte info. Then recover this byte into a byte[] then decrypt.

    I hope it is state of your aid.
    0
  • 1 short reply
    • 0

      HI,

      Thank You I'll try;

      0