diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 12:15:05 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 12:15:05 +0000 |
commit | 46651ce6fe013220ed397add242004d764fc0153 (patch) | |
tree | 6e5299f990f88e60174a1d3ae6e48eedd2688b2b /contrib/pgcrypto/expected/cast5_1.out | |
parent | Initial commit. (diff) | |
download | postgresql-14-46651ce6fe013220ed397add242004d764fc0153.tar.xz postgresql-14-46651ce6fe013220ed397add242004d764fc0153.zip |
Adding upstream version 14.5.upstream/14.5upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'contrib/pgcrypto/expected/cast5_1.out')
-rw-r--r-- | contrib/pgcrypto/expected/cast5_1.out | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/contrib/pgcrypto/expected/cast5_1.out b/contrib/pgcrypto/expected/cast5_1.out new file mode 100644 index 0000000..e3b38db --- /dev/null +++ b/contrib/pgcrypto/expected/cast5_1.out @@ -0,0 +1,48 @@ +-- +-- Cast5 cipher +-- +-- ensure consistent test output regardless of the default bytea format +SET bytea_output TO escape; +-- test vectors from RFC2144 +-- 128 bit key +SELECT encode(encrypt( +decode('01 23 45 67 89 AB CD EF', 'hex'), +decode('01 23 45 67 12 34 56 78 23 45 67 89 34 56 78 9A', 'hex'), +'cast5-ecb/pad:none'), 'hex'); +ERROR: encrypt error: Cipher cannot be initialized ? +-- result: 23 8B 4F E5 84 7E 44 B2 +-- 80 bit key +SELECT encode(encrypt( +decode('01 23 45 67 89 AB CD EF', 'hex'), +decode('01 23 45 67 12 34 56 78 23 45', 'hex'), +'cast5-ecb/pad:none'), 'hex'); +ERROR: encrypt error: Cipher cannot be initialized ? +-- result: EB 6A 71 1A 2C 02 27 1B +-- 40 bit key +SELECT encode(encrypt( +decode('01 23 45 67 89 AB CD EF', 'hex'), +decode('01 23 45 67 12', 'hex'), +'cast5-ecb/pad:none'), 'hex'); +ERROR: encrypt error: Cipher cannot be initialized ? +-- result: 7A C8 16 D1 6E 9B 30 2E +-- cbc +-- empty data +select encode( encrypt('', 'foo', 'cast5'), 'hex'); +ERROR: encrypt error: Cipher cannot be initialized ? +-- 10 bytes key +select encode( encrypt('foo', '0123456789', 'cast5'), 'hex'); +ERROR: encrypt error: Cipher cannot be initialized ? +-- decrypt +select decrypt(encrypt('foo', '0123456', 'cast5'), '0123456', 'cast5'); +ERROR: encrypt error: Cipher cannot be initialized ? +-- iv +select encode(encrypt_iv('foo', '0123456', 'abcd', 'cast5'), 'hex'); +ERROR: encrypt_iv error: Cipher cannot be initialized ? +select decrypt_iv(decode('384a970695ce016a', 'hex'), + '0123456', 'abcd', 'cast5'); +ERROR: decrypt_iv error: Cipher cannot be initialized ? +-- long message +select encode(encrypt('Lets try a longer message.', '0123456789', 'cast5'), 'hex'); +ERROR: encrypt error: Cipher cannot be initialized ? +select decrypt(encrypt('Lets try a longer message.', '0123456789', 'cast5'), '0123456789', 'cast5'); +ERROR: encrypt error: Cipher cannot be initialized ? |