aboutsummaryrefslogtreecommitdiffstats
path: root/t/sha0.c
blob: 48ecc2f698859070679035e5b46d3eee99152a9c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/* See LICENSE file for copyright and license details. */
#ifdef SUPPORT_SHA0
# define TEST
# include "../common.h"


static struct testcase testcases[] = {
	{1, 0, "abc", "0164b8a914cd2a5e74c4f7ff082c4d97f1edf880"},
	{0, 1, "\xff", "72eb6615d834148bbf63d5ddfe172a36a072a724"},
	{0, 1, "\x7f", "72eb6615d834148bbf63d5ddfe172a36a072a724"},
	{0, 1, "\x01", "72eb6615d834148bbf63d5ddfe172a36a072a724"},
	{0, 1, "\xfe", "b8b0ca781d45a96d2e71f798e7e26b5c2bc8b5c8"},
	{0, 1, "\x7e", "b8b0ca781d45a96d2e71f798e7e26b5c2bc8b5c8"},
	{0, 1, "\x00", "b8b0ca781d45a96d2e71f798e7e26b5c2bc8b5c8"}
};


#else
# define TEST_UNSUPPORTED
# include "../common.h"
#endif


int
main(void)
{
	TEST_MAIN("SHA0", SHA0, 1);
}