Update manuals.
[u/mdw/catacomb] / tests / sha
... / ...
CommitLineData
1# Test vectors for the SHA-1 hash function
2#
3# $Id: sha,v 1.5 2004/03/21 22:44:36 mdw Exp $
4
5# --- Basic hash function ---
6#
7# Some of these are taken directly from the Secure Hash Standard
8# (FIPS 180-1). Others were generated using the SSLeay implementation of
9# SHA-1.
10
11sha {
12 "" da39a3ee5e6b4b0d3255bfef95601890afd80709;
13 "a" 86f7e437faa5a7fce15d1ddcb9eaeaea377667b8;
14 "abc" a9993e364706816aba3e25717850c26c9cd0d89d;
15 "message digest" c12252ceda8be8994d5fa0290a47231c1d16aae3;
16 "abcdefghijklmnopqrstuvwxyz"
17 32d10c7b8cf96570ca04ce37f2a19d84240d3a89;
18 "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"
19 84983e441c3bd26ebaae4aa1f95129e5e54670f1;
20 "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
21 761c457bf73b14d27e9e9265c46f4b4dda11f940;
22}
23
24sha-rep {
25 "1234567890" 8 50abf5706a150990a08b2c5ea40fa0e585554732;
26 "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
27" 23 f74d36bf17ee23c46ec166a48a24da6ab999eaea;
28}
29
30# --- HMAC mode ---
31#
32# Test vectors from RFC2202.
33
34sha-hmac {
35 "Hi There"
36 0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b
37 b617318655057264e28bc0b6fb378c8ef146be00;
38
39 "what do ya want for nothing?"
40 4a656665
41 effcdf6ae5eb2fa2d27416d5f184df9c259a7c79;
42
43