Add modern SHA-2 based password hashes to pgcrypto.

This adapts the publicly available reference implementation on
https://www.akkadia.org/drepper/SHA-crypt.txt and adds the new hash
algorithms sha256crypt and sha512crypt to crypt() and gen_salt()
respectively.

Author: Bernd Helmle <[email protected]>
Reviewed-by: Japin Li <[email protected]>
Discussion: 
https://postgr.es/m/[email protected]

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/749a9e20c9790006f3af47f7a8faf4ad8dc358d9

Modified Files
--------------
contrib/pgcrypto/Makefile                    |   3 +-
contrib/pgcrypto/crypt-gensalt.c             |  82 ++++
contrib/pgcrypto/crypt-sha.c                 | 640 +++++++++++++++++++++++++++
contrib/pgcrypto/expected/crypt-shacrypt.out | 196 ++++++++
contrib/pgcrypto/meson.build                 |   2 +
contrib/pgcrypto/px-crypt.c                  |  22 +
contrib/pgcrypto/px-crypt.h                  |  31 ++
contrib/pgcrypto/sql/crypt-shacrypt.sql      |  99 +++++
doc/src/sgml/pgcrypto.sgml                   |  41 +-
9 files changed, 1114 insertions(+), 2 deletions(-)

Reply via email to