I have done encryption using
Expand|Select|Wrap|Line Numbers
- ->INSERT INTO "test1"("test")
- -> VALUES (pgp_pub_encrypt('testing', dearmor('------>BEGIN PGP PUBLIC KEY BLOCK-----
- ->Version: GnuPG v2.0.17 (MingW32)
- ->..............
- ->-----END PGP PUBLIC KEY BLOCK-----'
- ->)));
but when i am doing decryption with syntax:-
Expand|Select|Wrap|Line Numbers
- ->SELECT pgp_pub_decrypt(bytea ("test"),
- ->dearmor('-----BEGIN PGP PRIVATE KEY BLOCK-----
- ->Version: GnuPG v2.0.17 (MingW32)
- ->.............................
- ->-----END PGP PRIVATE KEY BLOCK-----'),'decrypt123') --> ->this is the passphrase
- -> FROM "test1";
I am getting error as:-
->ERROR: Corrupt data
->********** Error **********
->ERROR: Corrupt data
->SQL state: 39000
Please guide me where i am going wrong..as i need this urgently