4 -- test vectors from RFC2144
7 decode('01 23 45 67 89 AB CD EF', 'hex'),
8 decode('01 23 45 67 12 34 56 78 23 45 67 89 34 56 78 9A', 'hex'),
9 'cast5-ecb/pad:none'), 'hex');
15 -- result: 23 8B 4F E5 84 7E 44 B2
17 SELECT encode(encrypt(
18 decode('01 23 45 67 89 AB CD EF', 'hex'),
19 decode('01 23 45 67 12 34 56 78 23 45', 'hex'),
20 'cast5-ecb/pad:none'), 'hex');
26 -- result: EB 6A 71 1A 2C 02 27 1B
28 SELECT encode(encrypt(
29 decode('01 23 45 67 89 AB CD EF', 'hex'),
30 decode('01 23 45 67 12', 'hex'),
31 'cast5-ecb/pad:none'), 'hex');
37 -- result: 7A C8 16 D1 6E 9B 30 2E
40 select encode( encrypt('', 'foo', 'cast5'), 'hex');
47 select encode( encrypt('foo', '0123456789', 'cast5'), 'hex');
54 select decrypt(encrypt('foo', '0123456', 'cast5'), '0123456', 'cast5');
61 select encode(encrypt_iv('foo', '0123456', 'abcd', 'cast5'), 'hex');
67 select decrypt_iv(decode('384a970695ce016a', 'hex'),
68 '0123456', 'abcd', 'cast5');
75 select encode(encrypt('Lets try a longer message.', '0123456789', 'cast5'), 'hex');
77 ------------------------------------------------------------------
78 04fcffc91533e1505dadcb10766d9fed0937818e663e402384e049942ba60fff
81 select decrypt(encrypt('Lets try a longer message.', '0123456789', 'cast5'), '0123456789', 'cast5');
83 ----------------------------
84 Lets try a longer message.