diff options
| author | Tom Lane | 2005-07-12 20:27:45 +0000 |
|---|---|---|
| committer | Tom Lane | 2005-07-12 20:27:45 +0000 |
| commit | 807bbe6051de32dab969d0ed33807747af5a2b45 (patch) | |
| tree | f564058e9969688c09319f249f7cce01bb7b9bc8 /contrib/pgcrypto/sql | |
| parent | 7f0b690334b3f735f926c940686589eca486d247 (diff) | |
More pgcrypto fixes: handle long messages correctly, suppress
compiler warnings. Marko Kreen and Kris Jurka.
Diffstat (limited to 'contrib/pgcrypto/sql')
| -rw-r--r-- | contrib/pgcrypto/sql/3des.sql | 4 | ||||
| -rw-r--r-- | contrib/pgcrypto/sql/blowfish.sql | 4 | ||||
| -rw-r--r-- | contrib/pgcrypto/sql/cast5.sql | 4 | ||||
| -rw-r--r-- | contrib/pgcrypto/sql/des.sql | 4 | ||||
| -rw-r--r-- | contrib/pgcrypto/sql/rijndael.sql | 4 |
5 files changed, 20 insertions, 0 deletions
diff --git a/contrib/pgcrypto/sql/3des.sql b/contrib/pgcrypto/sql/3des.sql index 7e20aff5c07..99b936fa145 100644 --- a/contrib/pgcrypto/sql/3des.sql +++ b/contrib/pgcrypto/sql/3des.sql @@ -24,3 +24,7 @@ select decrypt(encrypt('foo', '0123456', '3des'), '0123456', '3des'); select encode(encrypt_iv('foo', '0123456', 'abcd', '3des'), 'hex'); select decrypt_iv(decode('50735067b073bb93', 'hex'), '0123456', 'abcd', '3des'); +-- long message +select encode(encrypt('Lets try a longer message.', '0123456789012345678901', '3des'), 'hex'); +select decrypt(encrypt('Lets try a longer message.', '0123456789012345678901', '3des'), '0123456789012345678901', '3des'); + diff --git a/contrib/pgcrypto/sql/blowfish.sql b/contrib/pgcrypto/sql/blowfish.sql index 565282cb0f3..c0383f54218 100644 --- a/contrib/pgcrypto/sql/blowfish.sql +++ b/contrib/pgcrypto/sql/blowfish.sql @@ -85,3 +85,7 @@ select decrypt(encrypt('foo', '0123456', 'bf'), '0123456', 'bf'); select encode(encrypt_iv('foo', '0123456', 'abcd', 'bf'), 'hex'); select decrypt_iv(decode('95c7e89322525d59', 'hex'), '0123456', 'abcd', 'bf'); +-- long message +select encode(encrypt('Lets try a longer message.', '0123456789', 'bf'), 'hex'); +select decrypt(encrypt('Lets try a longer message.', '0123456789', 'bf'), '0123456789', 'bf'); + diff --git a/contrib/pgcrypto/sql/cast5.sql b/contrib/pgcrypto/sql/cast5.sql index 553ae4f0f2a..0761f34e758 100644 --- a/contrib/pgcrypto/sql/cast5.sql +++ b/contrib/pgcrypto/sql/cast5.sql @@ -40,3 +40,7 @@ select encode(encrypt_iv('foo', '0123456', 'abcd', 'cast5'), 'hex'); select decrypt_iv(decode('384a970695ce016a', 'hex'), '0123456', 'abcd', 'cast5'); +-- long message +select encode(encrypt('Lets try a longer message.', '0123456789', 'cast5'), 'hex'); +select decrypt(encrypt('Lets try a longer message.', '0123456789', 'cast5'), '0123456789', 'cast5'); + diff --git a/contrib/pgcrypto/sql/des.sql b/contrib/pgcrypto/sql/des.sql index 3b55ca5e3a6..179bd83ba91 100644 --- a/contrib/pgcrypto/sql/des.sql +++ b/contrib/pgcrypto/sql/des.sql @@ -22,3 +22,7 @@ select decrypt(encrypt('foo', '0123456', 'des'), '0123456', 'des'); select encode(encrypt_iv('foo', '0123456', 'abcd', 'des'), 'hex'); select decrypt_iv(decode('50735067b073bb93', 'hex'), '0123456', 'abcd', 'des'); +-- long message +select encode(encrypt('Lets try a longer message.', '01234567', 'des'), 'hex'); +select decrypt(encrypt('Lets try a longer message.', '01234567', 'des'), '01234567', 'des'); + diff --git a/contrib/pgcrypto/sql/rijndael.sql b/contrib/pgcrypto/sql/rijndael.sql index c609a635df5..4d6af0ffaa2 100644 --- a/contrib/pgcrypto/sql/rijndael.sql +++ b/contrib/pgcrypto/sql/rijndael.sql @@ -56,3 +56,7 @@ select encode(encrypt_iv('foo', '0123456', 'abcd', 'aes'), 'hex'); select decrypt_iv(decode('2c24cb7da91d6d5699801268b0f5adad', 'hex'), '0123456', 'abcd', 'aes'); +-- long message +select encode(encrypt('Lets try a longer message.', '0123456789', 'aes'), 'hex'); +select decrypt(encrypt('Lets try a longer message.', '0123456789', 'aes'), '0123456789', 'aes'); + |
