On 11/29/07, Stefan Niantschur <sniantschur(at)web(dot)de> wrote:
> SELECT
> pgp_pub_decrypt(dearmor(armor(pgp_pub_encrypt(armor(pgp_sym_encrypt('geheim'::text,'test'::text)),dearmor((SELECT
> ens_pubkey FROM ens_user WHERE ens_userid =
> 10112)::text)))),dearmor((SELECT ens_privkey FROM ens_user WHERE
> ens_userid = 10112)::text),'test'::text);
> -> returns 'ERROR: Corrupt data' => problem
Reason for this seems to be wrong password for the key.
And pgcrypto is not very helpful pointing out the problem.
I need to review that part of code to give better error messages.
This is pretty common mistake that can happen.
--
marko