10 June,2022 by Rambler
There are different types of encryption supported by PostgreSQL. If the requirement is to support encryption for specific fields - look into the pgcrypto module
create table cryptosource (ID INT , avalue varchar(30));
insert into cryptosource (ID , avalue)
select 1 , 'bcbcbcbc'
CREATE EXTENSION pgcrypto;
SELECT avalue, crypt(avalue, gen_salt('md5')) AS hashed_value
FROM cryptosource;
'sha1' is an alternative option to 'md5'
This is only a preview. Your comment has not yet been posted.
As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.
Having trouble reading this image? View an alternate.
Posted by: |