4 -- some standard Blowfish testvalues
6 decode('0000000000000000', 'hex'),
7 decode('0000000000000000', 'hex'),
8 'bf-ecb/pad:none'), 'hex');
14 SELECT encode(encrypt(
15 decode('ffffffffffffffff', 'hex'),
16 decode('ffffffffffffffff', 'hex'),
17 'bf-ecb/pad:none'), 'hex');
23 SELECT encode(encrypt(
24 decode('1000000000000001', 'hex'),
25 decode('3000000000000000', 'hex'),
26 'bf-ecb/pad:none'), 'hex');
32 SELECT encode(encrypt(
33 decode('1111111111111111', 'hex'),
34 decode('1111111111111111', 'hex'),
35 'bf-ecb/pad:none'), 'hex');
41 SELECT encode(encrypt(
42 decode('0123456789abcdef', 'hex'),
43 decode('fedcba9876543210', 'hex'),
44 'bf-ecb/pad:none'), 'hex');
50 SELECT encode(encrypt(
51 decode('01a1d6d039776742', 'hex'),
52 decode('fedcba9876543210', 'hex'),
53 'bf-ecb/pad:none'), 'hex');
59 SELECT encode(encrypt(
60 decode('ffffffffffffffff', 'hex'),
61 decode('0000000000000000', 'hex'),
62 'bf-ecb/pad:none'), 'hex');
69 SELECT encode(encrypt(
70 decode('fedcba9876543210', 'hex'),
71 decode('f0e1d2c3b4a5968778695a4b3c2d1e0f', 'hex'),
72 'bf-ecb/pad:none'), 'hex');
79 SELECT encode(encrypt(
80 decode('01234567890123456789', 'hex'),
81 decode('33443344334433443344334433443344', 'hex'),
84 ----------------------------------
85 0d04a43a20456dee5ede6ed9e4dcaaa6
90 SELECT encode(encrypt(
91 decode('6b77b4d63006dee605b156e27403979358deb9e7154616d959f1652bd5', 'hex'),
92 decode('37363534333231204e6f77206973207468652074696d6520666f7220', 'hex'),
95 ------------------------------------------------------------------
96 4f2beb748c4f689ec755edb9dc252a41b93a3786850b4c75d6a702b6a8e48825
100 SELECT encode(encrypt(
101 decode('6b77b4d63006dee605b156e27403979358deb9e7154616d959f1652bd5ff92cc', 'hex'),
102 decode('37363534333231204e6f77206973207468652074696d6520666f722000', 'hex'),
105 ----------------------------------------------------------------------------------
106 3ea6357a0ee7fad6d0c4b63464f2aafa40c2e91b4b7e1bba8114932fd92b5c8f111e7e50e7b2e541
110 SELECT encode(encrypt(
111 decode('fedcba9876543210', 'hex'),
112 decode('f0e1d2c3b4a5968778695a4b3c2d1e0f001122334455667704689104c2fd3b2f584023641aba61761f1f1f1f0e0e0e0effffffffffffffff', 'hex'),
113 'bf-ecb/pad:none'), 'hex');
119 -- result: c04504012e4e1f53
121 select encode( encrypt('', 'foo', 'bf'), 'hex');
128 select encode( encrypt('foo', '0123456789', 'bf'), 'hex');
135 select encode( encrypt('foo', '0123456789012345678901', 'bf'), 'hex');
142 select decrypt(encrypt('foo', '0123456', 'bf'), '0123456', 'bf');
149 select encode(encrypt_iv('foo', '0123456', 'abcd', 'bf'), 'hex');
155 select decrypt_iv(decode('95c7e89322525d59', 'hex'), '0123456', 'abcd', 'bf');
162 select encode(encrypt('Lets try a longer message.', '0123456789', 'bf'), 'hex');
164 ------------------------------------------------------------------
165 a76059f7a1b627b5b84080d9beb337714c7a7f8b70300023e5feb6dfa6813536
168 select decrypt(encrypt('Lets try a longer message.', '0123456789', 'bf'), '0123456789', 'bf');
170 ----------------------------
171 Lets try a longer message.