4 -- some standard Blowfish testvalues
5 SELECT encrypt('\x0000000000000000', '\x0000000000000000', 'bf-ecb/pad:none');
11 SELECT encrypt('\xffffffffffffffff', '\xffffffffffffffff', 'bf-ecb/pad:none');
17 SELECT encrypt('\x1000000000000001', '\x3000000000000000', 'bf-ecb/pad:none');
23 SELECT encrypt('\x1111111111111111', '\x1111111111111111', 'bf-ecb/pad:none');
29 SELECT encrypt('\x0123456789abcdef', '\xfedcba9876543210', 'bf-ecb/pad:none');
35 SELECT encrypt('\x01a1d6d039776742', '\xfedcba9876543210', 'bf-ecb/pad:none');
41 SELECT encrypt('\xffffffffffffffff', '\x0000000000000000', 'bf-ecb/pad:none');
48 SELECT encrypt('\xfedcba9876543210', '\xf0e1d2c3b4a5968778695a4b3c2d1e0f', 'bf-ecb/pad:none');
55 SELECT encrypt('\x01234567890123456789', '\x33443344334433443344334433443344', 'bf-ecb');
57 ------------------------------------
58 \x0d04a43a20456dee5ede6ed9e4dcaaa6
63 SELECT encrypt('\x6b77b4d63006dee605b156e27403979358deb9e7154616d959f1652bd5',
64 '\x37363534333231204e6f77206973207468652074696d6520666f7220',
67 --------------------------------------------------------------------
68 \x4f2beb748c4f689ec755edb9dc252a41b93a3786850b4c75d6a702b6a8e48825
72 SELECT encrypt('\x6b77b4d63006dee605b156e27403979358deb9e7154616d959f1652bd5ff92cc',
73 '\x37363534333231204e6f77206973207468652074696d6520666f722000',
76 ------------------------------------------------------------------------------------
77 \x3ea6357a0ee7fad6d0c4b63464f2aafa40c2e91b4b7e1bba8114932fd92b5c8f111e7e50e7b2e541
81 SELECT encrypt('\xfedcba9876543210',
82 '\xf0e1d2c3b4a5968778695a4b3c2d1e0f001122334455667704689104c2fd3b2f584023641aba61761f1f1f1f0e0e0e0effffffffffffffff',
90 select encrypt('', 'foo', 'bf');
97 select encrypt('foo', '0123456789', 'bf');
104 select encrypt('foo', '0123456789012345678901', 'bf');
111 select encode(decrypt(encrypt('foo', '0123456', 'bf'), '0123456', 'bf'), 'escape');
118 select encrypt_iv('foo', '0123456', 'abcd', 'bf');
124 select encode(decrypt_iv('\x95c7e89322525d59', '0123456', 'abcd', 'bf'), 'escape');
131 select encrypt('Lets try a longer message.', '0123456789', 'bf');
133 --------------------------------------------------------------------
134 \xa76059f7a1b627b5b84080d9beb337714c7a7f8b70300023e5feb6dfa6813536
137 select encode(decrypt(encrypt('Lets try a longer message.', '0123456789', 'bf'), '0123456789', 'bf'), 'escape');
139 ----------------------------
140 Lets try a longer message.