dbTalk Databases Forums  

SHA functions

comp.databases.postgresql comp.databases.postgresql


Discuss SHA functions in the comp.databases.postgresql forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Anselmo Canfora
 
Posts: n/a

Default SHA functions - 06-28-2010 , 10:48 AM






Hi, since there is a md5 function in PG, does anybody know if there is a
plan to add the support for SHA family digest functions in PG>9?

Reply With Quote
  #2  
Old   
Andreas Kretschmer
 
Posts: n/a

Default Re: SHA functions - 06-29-2010 , 01:30 AM






Anselmo Canfora <nobody (AT) nowhere (DOT) net> wrote:
Quote:
Hi, since there is a md5 function in PG, does anybody know if there is a
plan to add the support for SHA family digest functions in PG>9?
You can use that already, see
http://www.postgresql.org/docs/curre.../pgcrypto.html


Andreas
--
Andreas Kretschmer
Linux - weil ich es mir wert bin!
GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net

Reply With Quote
  #3  
Old   
Anselmo Canfora
 
Posts: n/a

Default Re: SHA functions - 06-29-2010 , 06:03 AM



Il 29/06/2010 7.30, Andreas Kretschmer ha scritto:
Quote:
Anselmo Canfora<nobody (AT) nowhere (DOT) net> wrote:
Hi, since there is a md5 function in PG, does anybody know if there is a
plan to add the support for SHA family digest functions in PG>9?

You can use that already, see
http://www.postgresql.org/docs/curre.../pgcrypto.html


Andreas
It works perfectly, thanks!

db_atm=# \i /usr/share/postgresql/8.3/contrib/pgcrypto.sql
SET
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION

db_atm=# select encode(digest('test', 'sha256'), 'hex');
encode
------------------------------------------------------------------
9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd1 5d6c15b0f00a08
(1 row)

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.