Thread: pgsql: Add modern SHA-2 based password hashes to pgcrypto.
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 <mailings@oopsware.de> Reviewed-by: Japin Li <japinli@hotmail.com> Discussion: https://postgr.es/m/c763235a2757e2f5f9e3e27268b9028349cef659.camel@oopsware.de 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(-)