@@ -10,16 +10,15 @@ int test_sha256_abc(int argc, char **argv, int flags) {
10
10
0xba , 0x78 , 0x16 , 0xbf , 0x8f , 0x01 , 0xcf , 0xea ,
11
11
0x41 , 0x41 , 0x40 , 0xde , 0x5d , 0xae , 0x22 , 0x23 ,
12
12
0xb0 , 0x03 , 0x61 , 0xa3 , 0x96 , 0x17 , 0x7a , 0x9c ,
13
- 0xb4 , 0x10 , 0xff , 0x61 , 0xf2 , 0x00 , 0x15 , 0xad
14
- };
13
+ 0xb4 , 0x10 , 0xff , 0x61 , 0xf2 , 0x00 , 0x15 , 0xad };
15
14
const char * test_str = "abc" ;
16
15
17
16
UNUSED (argc );
18
17
UNUSED (argv );
19
18
UNUSED (flags );
20
19
21
20
sha256_init (& ctx );
22
- sha256_update (& ctx , (BYTE * )test_str , 3 );
21
+ sha256_update (& ctx , (BYTE * )test_str , 3 );
23
22
sha256_final (& ctx , hash );
24
23
25
24
TEST_ASSERT (memcmp (hash , expected , 32 ) == 0 );
@@ -33,19 +32,18 @@ int test_sha256_large(int argc, char **argv, int flags) {
33
32
0x8e , 0x44 , 0xff , 0x94 , 0xb6 , 0x8f , 0xcb , 0x09 ,
34
33
0x6a , 0x8d , 0x5c , 0xdb , 0x8f , 0x1c , 0xc7 , 0x8a ,
35
34
0x9c , 0x47 , 0x58 , 0x45 , 0xf1 , 0x1a , 0x8d , 0x67 ,
36
- 0x6f , 0x39 , 0xc9 , 0x53 , 0x7e , 0xd2 , 0x31 , 0xe0
37
- };
35
+ 0x6f , 0x39 , 0xc9 , 0x53 , 0x7e , 0xd2 , 0x31 , 0xe0 };
38
36
int i ;
39
37
40
38
UNUSED (argc );
41
39
UNUSED (argv );
42
40
UNUSED (flags );
43
41
44
- for (i = 0 ; i < BUFSIZE ; i ++ )
42
+ for (i = 0 ; i < BUFSIZE ; i ++ )
45
43
buf [i ] = i % 256 ;
46
44
47
45
sha256_init (& ctx );
48
- for (i = 0 ; i < 1000 ; i ++ )
46
+ for (i = 0 ; i < 1000 ; i ++ )
49
47
sha256_update (& ctx , buf , BUFSIZE );
50
48
sha256_final (& ctx , hash );
51
49
@@ -60,8 +58,7 @@ int test_sha256_million_a(int argc, char **argv, int flags) {
60
58
0xcd , 0xc7 , 0x6e , 0x5c , 0x99 , 0x14 , 0xfb , 0x92 ,
61
59
0x81 , 0xa1 , 0xc7 , 0xe2 , 0x84 , 0xd7 , 0x3e , 0x67 ,
62
60
0xf1 , 0x80 , 0x9a , 0x48 , 0xa4 , 0x97 , 0x20 , 0x0e ,
63
- 0x04 , 0x6d , 0x39 , 0xcc , 0xc7 , 0x11 , 0x2c , 0xd0
64
- };
61
+ 0x04 , 0x6d , 0x39 , 0xcc , 0xc7 , 0x11 , 0x2c , 0xd0 };
65
62
int i ;
66
63
BYTE a = 'a' ;
67
64
@@ -76,4 +73,4 @@ int test_sha256_million_a(int argc, char **argv, int flags) {
76
73
77
74
TEST_ASSERT (memcmp (hash , expected , 32 ) == 0 );
78
75
return 0 ;
79
- }
76
+ }
0 commit comments