mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
More pgcrypto fixes: handle long messages correctly, suppress
compiler warnings. Marko Kreen and Kris Jurka.
This commit is contained in:
@ -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');
|
||||
|
||||
|
@ -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');
|
||||
|
||||
|
@ -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');
|
||||
|
||||
|
@ -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');
|
||||
|
||||
|
@ -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');
|
||||
|
||||
|
Reference in New Issue
Block a user