# Test vectors for the SHA-1 hash function # # $Id: sha,v 1.6 2004/04/21 00:38:42 mdw Exp $ # --- Basic hash function --- # # Some of these are taken directly from the Secure Hash Standard # (FIPS 180-1). Others were generated using the SSLeay implementation of # SHA-1. sha { "" da39a3ee5e6b4b0d3255bfef95601890afd80709; "a" 86f7e437faa5a7fce15d1ddcb9eaeaea377667b8; "abc" a9993e364706816aba3e25717850c26c9cd0d89d; "message digest" c12252ceda8be8994d5fa0290a47231c1d16aae3; "abcdefghijklmnopqrstuvwxyz" 32d10c7b8cf96570ca04ce37f2a19d84240d3a89; "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq" 84983e441c3bd26ebaae4aa1f95129e5e54670f1; "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" 761c457bf73b14d27e9e9265c46f4b4dda11f940; } sha-rep { "1234567890" 8 50abf5706a150990a08b2c5ea40fa0e585554732; "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 " 23 f74d36bf17ee23c46ec166a48a24da6ab999eaea; "a" 1000000 34aa973cd4c4daa4f61eeb2bdbad27316534016f; } # --- HMAC mode --- # # Test vectors from RFC2202. sha-hmac { "Hi There" 0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b b617318655057264e28bc0b6fb378c8ef146be00; "what do ya want for nothing?" 4a656665 effcdf6ae5eb2fa2d27416d5f184df9c259a7c79; "毫毫毫毫毫毫毫毫毫毫毫毫毫毫毫毫毫毫毫毫毫毫毫毫毫" aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 125d7342b9ac11cd91a39af48aa17b4f63f175d3; "様様様様様様様様様様様様様様様様様様様様様様様様様" 0102030405060708090a0b0c0d0e0f10111213141516171819 4c9007f4026250c6bc8414f9bf50c86c2d7235da; "Test With Truncation" 0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c 4c1a03424b55e07fe7f27be1d58bb9324a9a5a04; "Test Using Larger Than Block-Size Key - Hash Key First" aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aa4ae5e15272d00e95705637ce8a3b55ed402112; "Test Using Larger Than Block-Size Key and Larger Than One Block-Size Data" aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa e8e99d0f45237d786d6bbaa7965c7808bbff1a91; }