4
-- ensure consistent test output regardless of the default bytea format
5
SET bytea_output TO escape;
7
-- test vector from somewhere
9
decode('80 00 00 00 00 00 00 00', 'hex'),
10
decode('01 01 01 01 01 01 01 01
11
01 01 01 01 01 01 01 01
12
01 01 01 01 01 01 01 01', 'hex'),
13
'3des-ecb/pad:none'), 'hex');
14
-- val 95 F8 A5 E5 DD 31 D9 00
16
select encode( encrypt('', 'foo', '3des'), 'hex');
18
select encode( encrypt('foo', '0123456789', '3des'), 'hex');
20
select encode( encrypt('foo', '0123456789012345678901', '3des'), 'hex');
23
select decrypt(encrypt('foo', '0123456', '3des'), '0123456', '3des');
26
select encode(encrypt_iv('foo', '0123456', 'abcd', '3des'), 'hex');
27
select decrypt_iv(decode('50735067b073bb93', 'hex'), '0123456', 'abcd', '3des');
30
select encode(encrypt('Lets try a longer message.', '0123456789012345678901', '3des'), 'hex');
31
select decrypt(encrypt('Lets try a longer message.', '0123456789012345678901', '3des'), '0123456789012345678901', '3des');