aboutsummaryrefslogblamecommitdiffstats
path: root/sha1.c
blob: 3a465e8674d32d14f875396d29acf35dee43e4ab (plain) (tree)
1
2
3
4
5
6
7





                                                         
                                                               








                                                                               
                    

                                                                            


                                                                              







                                
/* See LICENSE file for copyright and license details. */
#define TEST
#include "common.h"


static struct testcase testcases[] = {
	{1, 0, "", "da39a3ee5e6b4b0d3255bfef95601890afd80709"},
	{1, 0, "\xff", "85e53271e14006f0265921d02d4d736cdc580b0b"},
	{1, 0, "\xe5\xe0\x99\x24", "d1dffbc8a175dd8eebe0da87b1792b6dc1018e82"},
	{56UL, 8, "\0", "9438e360f578e12c0e0e8ed28e2c125c1cefee16"},
	{1000UL, 0, "Q", "49f1cfe3829963158e2b2b2cb5df086cee2e3bb0"},
	{1000UL, 0, "A", "3ae3644d6777a1f56a1defeabc74af9c4b313e49"},
	{1005UL, 0, "\x99", "18685d56c8bf67c3cee4443e9a78f65c30752f5d"},
	{1, 0, "abc", "a9993e364706816aba3e25717850c26c9cd0d89d"},
	{1, 0, "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
	 "84983e441c3bd26ebaae4aa1f95129e5e54670f1"},
#ifdef MASSIVE_TESTS
	{0x20000000UL, 0, "A", "df3f26fce8fa7bec2c61d0506749a320ac7dc942"},
	{0x41000000UL, 8, "\0", "320c617b0b6ee1b6f9c3271eae135f40cae22c10"},
	{0x6000003FUL, 0, "\x84", "b20aa99b62e6a480fd93b4d24b2c19ffac649bb8"},
#endif
	{1000000UL, 8, "\0", "bef3595266a65a2ff36b700a75e8ed95c68210b6"}
};


int
main(void)
{
	TEST_MAIN("SHA1", SHA1);
}