i have to ask ..any relation to guru charles petzold?
http://en.wikipedia.org/wiki/Charles_Petzold

Martin Gainty 
______________________________________________ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.




> Date: Sat, 7 Nov 2009 21:35:15 +0100
> From: c.petz...@gmx.net
> To: pgsql-general@postgresql.org
> Subject: [GENERAL] pgp encryption functions
> 
> Hello,
> I'm trying to use the pgp_pub_encrypt and pgp_pub_decrypt_bytea 
> functions to store some data in my db.
> 
> This is how I encrypt:
> 
> INSERT INTO "Test"(
>             "test")
>     VALUES (pgp_pub_encrypt('test', dearmor('-----BEGIN PGP PUBLIC KEY 
> BLOCK-----
> Version: GnuPG v2.0.12 (MingW32)
> 
> mQENBErk2KkBCAC.... (public key block) ...
> -----END PGP PUBLIC KEY BLOCK-----
> ')));
> 
> And this is how I try to decrypt:
> 
> SELECT pgp_pub_decrypt_bytea(bytea ("test"), dearmor('-----BEGIN PGP 
> PRIVATE KEY BLOCK-----
> Version: GnuPG v2.0.12 (MingW32)
> 
> lQO+BErk2KkBC... (private key block) ...
> -----END PGP PRIVATE KEY BLOCK-----
> '), 'ktulu3437')  --> this is the passphrase
>   FROM "Test";
> 
> Encryptions works fine, but the decrypting returns "Corrupt data".
> What am I doing wrong?
> 
> Christian Petzold.
> 
> 
> 
> -- 
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
                                          
_________________________________________________________________
Hotmail: Trusted email with powerful SPAM protection.
http://clk.atdmt.com/GBL/go/177141665/direct/01/

Reply via email to