| From: | Moreno Andreo <moreno(dot)andreo(at)evolu-s(dot)it> |
|---|---|
| To: | PostgreSQL mailing lists <pgsql-general(at)postgresql(dot)org> |
| Subject: | pgp_sym_decrypt() - error 39000: wrong key or corrupt data |
| Date: | 2018-06-21 15:36:23 |
| Message-ID: | 1d7de609-5738-bf51-f0b9-b32a889f04e1@evolu-s.it |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
Hi,
while playing with pgcrypto I ran into a strange issue (postgresql
9.5.3 x86 on Windows 7)
Having a table with a field
dateofbirth text
I made the following sequence of SQL commands
update tbl_p set dateofbirth = pgp_sym_encrypt('2018-06-21', 'AES_KEY')
where codguid = '00000001-0001-0001-0001-000000000001';
OK
select pgp_sym_decrypt(dateofbirth::bytea, 'AES_KEY') as datanasc from
tbl_p where codguid = '00000001-0001-0001-0001-000000000001'
'2018-06-21'
select * from tab_paz where pgp_sym_decrypt(natoil::bytea, 'AES_KEY') =
'2018-06-21'
ERROR: Wrong key or corrupt data
********** Error **********
ERROR: Wrong key or corrupt data
SQL state: 39000
Can't find reference anywhere...
Any help would be appreciated.
Thanks,
Moreno.-
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Pierre Timmermans | 2018-06-21 20:12:06 | Re: using pg_basebackup for point in time recovery |
| Previous Message | Adam Brusselback | 2018-06-21 14:05:20 | Re: How can I stop a long run pgAgent job? |