Re: Problem with encode () and hmac() in pgcrypto

From: Marko Kreen <markokr(at)gmail(dot)com>
To: hlcborg <h(dot)luis(dot)cardoso(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Problem with encode () and hmac() in pgcrypto
Date: 2011-02-03 14:01:14
Message-ID: AANLkTimcE3W0a_5rgOLOwfp4q67nmfp7BOtHGR4sVJUH@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Feb 3, 2011 at 2:38 PM, hlcborg <h(dot)luis(dot)cardoso(at)gmail(dot)com> wrote:
> For now, I already can use in my PG database the PL/Python to create
> functions.
> But I need a library that  can do the:
>> Plain SHA1, which is signed with RSA signature.
>
> Do you known any PL/Python wrapper libraries
> around OpenSSL (or any other crypto library) that I could use.

pycrypto - standalone, non-OpenSSL
m2crypto - wrapper for OpenSSL

They have bit different feature sets, use whichever you get to work.

The are other wrappers around openssl, but they are unmaintained.

> I have found some in the internet, but when I try to compile them there are
> always errors about undeclared functions or other errors...

Please ask help for that from particular project's mailinglist.
Perhaps your distro already includes either of them?
Then use it, instead of compiling on your own.

One note - if you install package in non-standard location,
you need to set PYTHONPATH in postgres server environment
to point to there, otherwise PL won't see it.

--
marko

In response to

Browse pgsql-general by date

  From Date Subject
Next Message David Johnston 2011-02-03 14:37:10 Re: Issues with generate_series using integer boundaries
Previous Message Thom Brown 2011-02-03 13:58:04 Re: Issues with generate_series using integer boundaries