Thread: Security

Security

From
"Ernesto A. Lira Castro"
Date:
I'm trying to set login & passwords to my system with Perl DBI for
Postgresql, but i want to have a field on my Postgres's database
that can be type password!! is that possible?? i see only fields types
(Char, integer, long . . .) i want some password to be encrypted.


And where can i get some information for implementing that security on
my system!

Thanks
i hope for your answer


Re: Security

From
Peter Eisentraut
Date:
Ernesto A. Lira Castro writes:

> I'm trying to set login & passwords to my system with Perl DBI for
> Postgresql, but i want to have a field on my Postgres's database
> that can be type password!! is that possible?? i see only fields types
> (Char, integer, long . . .) i want some password to be encrypted.

In contrib/pgcrypto in the source tree there are some digest (hash)
functions (note: digest != encryption) that you might find useful.

-- 
Peter Eisentraut   peter_e@gmx.net   http://funkturm.homeip.net/~peter



Re: Security

From
Jeremy Buchmann
Date:
> I'm trying to set login & passwords to my system with Perl DBI for
> Postgresql, but i want to have a field on my Postgres's database
> that can be type password!! is that possible?? i see only fields types
> (Char, integer, long . . .) i want some password to be encrypted.

You can use MD5 or SHA perl modules to get a digest of the password and then
get the hex representation of the digest and store that in the database as a
char or varchar.

> And where can i get some information for implementing that security on
> my system!

The MD5 and SHA modules are on cpan.org.  I only have experience with the
MD5 module, but it's very simple to use, provided you know a little Perl.  I
can show you code if you don't understand the examples provided with the
module.

-- Jeremy  [jeremy@wellsgaming.com]