summaryrefslogtreecommitdiff
path: root/contrib/pgcrypto/sql
diff options
context:
space:
mode:
authorNeil Conway2006-07-13 04:15:25 +0000
committerNeil Conway2006-07-13 04:15:25 +0000
commit1abf76e82cbb5c09f5517d155ea404727f67a507 (patch)
tree8d286cfb4963dc8e13bbb322569e36d8a008e797 /contrib/pgcrypto/sql
parent99ac1e69ba750c40cc83e344a1eb65aaa325a296 (diff)
"Annual" pgcrypto update from Marko Kreen:
Few cleanups and couple of new things: - add SHA2 algorithm to older OpenSSL - add BIGNUM math to have public-key cryptography work on non-OpenSSL build. - gen_random_bytes() function The status of SHA2 algoritms and public-key encryption can now be changed to 'always available.' That makes pgcrypto functionally complete and unless there will be new editions of AES, SHA2 or OpenPGP standards, there is no major changes planned.
Diffstat (limited to 'contrib/pgcrypto/sql')
-rw-r--r--contrib/pgcrypto/sql/sha2.sql7
1 files changed, 7 insertions, 0 deletions
diff --git a/contrib/pgcrypto/sql/sha2.sql b/contrib/pgcrypto/sql/sha2.sql
index f1d0ca63f0..447ae90765 100644
--- a/contrib/pgcrypto/sql/sha2.sql
+++ b/contrib/pgcrypto/sql/sha2.sql
@@ -2,6 +2,13 @@
-- SHA2 family
--
+-- SHA224
+SELECT encode(digest('', 'sha224'), 'hex');
+SELECT encode(digest('a', 'sha224'), 'hex');
+SELECT encode(digest('abc', 'sha224'), 'hex');
+SELECT encode(digest('abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq', 'sha224'), 'hex');
+SELECT encode(digest('12345678901234567890123456789012345678901234567890123456789012345678901234567890', 'sha224'), 'hex');
+
-- SHA256
SELECT encode(digest('', 'sha256'), 'hex');
SELECT encode(digest('a', 'sha256'), 'hex');