Revert commit 66c0185a3 and follow-on patches.
[pgsql.git] / contrib / pgcrypto / sql / hmac-md5.sql
blob981ed097a5cdfb8dc637a909463f0d1ba2287dec
1 --
2 -- HMAC-MD5
3 --
5 SELECT hmac(
6 'Hi There',
7 '\x0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b'::bytea,
8 'md5');
10 -- 2
11 SELECT hmac(
12 'Jefe',
13 'what do ya want for nothing?',
14 'md5');
16 -- 3
17 SELECT hmac(
18 '\xdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd'::bytea,
19 '\xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'::bytea,
20 'md5');
22 -- 4
23 SELECT hmac(
24 '\xcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcd'::bytea,
25 '\x0102030405060708090a0b0c0d0e0f10111213141516171819'::bytea,
26 'md5');
28 -- 5
29 SELECT hmac(
30 'Test With Truncation',
31 '\x0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c'::bytea,
32 'md5');
34 -- 6
35 SELECT hmac(
36 'Test Using Larger Than Block-Size Key - Hash Key First',
37 '\xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'::bytea,
38 'md5');
40 -- 7
41 SELECT hmac(
42 'Test Using Larger Than Block-Size Key and Larger Than One Block-Size Data',
43 '\xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'::bytea,
44 'md5');