Thread: How to store encrypted data into database

How to store encrypted data into database

From
Sudheesh Krishnankutty
Date:
Hi all,

I am creating a table that contains userid and encrypted password.
I am using SHA-1 algorithm for encrypting the plain text password.
I stored the encrypted password into tht postgres database as varchar.
While retrieving I found that all the characters are changed.

How should I store the encrypted password.  My understanding is that
while storing as varchar the character encoding changes the encrypted
text.
I am I right?

So how to store the encrypted text.

regards
sudheesh

Attachment