SHA function?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Atli
    Recognized Expert Expert
    • Nov 2006
    • 5062

    SHA function?

    Hi.

    I've been looking for a function similar to MySQL's sha() function in Postgre and I can't seem to find anything.

    The reason is that I have a system that is written for MySQL and I've been asked to make it compatible with Postgre.

    Thanks.
  • michaelb
    Recognized Expert Contributor
    • Nov 2006
    • 534

    #2
    I haven't seen this in the standard Postgresql distribution, although Postgres internally uses md5 for password encoding.

    Both, sha and md5 are provided with contrib/pgcrypto
    (contrib is the set of optional extensions to the core Postgresql distribution.)

    Many Postgres APIs (PHP, Java, etc) have their own implementation of sha and md5 and perhaps this could be another option to consider.

    Comment

    Working...