Skip to content

Commit 246f880

Browse files
committed
Fix pointer warning in test vectors function
Fix pointer warning in calling NESSIEAdd with inline text by casting to unsigned char *
1 parent 6891f66 commit 246f880

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Whirlpool.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1858,49 +1858,49 @@ void makeISOTestVectors(void) {
18581858

18591859
printf("2. In this example the data-string consists of a single byte, namely the ASCII-coded version of the letter 'a'.\n\n");
18601860
NESSIEinit(&w);
1861-
NESSIEadd("a", 8*1, &w);
1861+
NESSIEadd((u8*)"a", 8*1, &w);
18621862
NESSIEfinalize(&w, digest);
18631863
printf("The hash-code is the following 512-bit string.\n\n");
18641864
display(digest, DIGESTBYTES); printf("\n\n");
18651865

18661866
printf("3. In this example the data-string is the three-byte string consisting of the ASCII-coded version of 'abc'.\n\n");
18671867
NESSIEinit(&w);
1868-
NESSIEadd("abc", 8*3, &w);
1868+
NESSIEadd((u8*)"abc", 8*3, &w);
18691869
NESSIEfinalize(&w, digest);
18701870
printf("The hash-code is the following 512-bit string.\n\n");
18711871
display(digest, DIGESTBYTES); printf("\n\n");
18721872

18731873
printf("4. In this example the data-string is the 14-byte string consisting of the ASCII-coded version of 'message digest'.\n\n");
18741874
NESSIEinit(&w);
1875-
NESSIEadd("message digest", 8*14, &w);
1875+
NESSIEadd((u8*)"message digest", 8*14, &w);
18761876
NESSIEfinalize(&w, digest);
18771877
printf("The hash-code is the following 512-bit string.\n\n");
18781878
display(digest, DIGESTBYTES); printf("\n\n");
18791879

18801880
printf("5. In this example the data-string is the 26-byte string consisting of the ASCII-coded version of 'abcdefghijklmnopqrstuvwxyz'.\n\n");
18811881
NESSIEinit(&w);
1882-
NESSIEadd("abcdefghijklmnopqrstuvwxyz", 8*26, &w);
1882+
NESSIEadd((u8*)"abcdefghijklmnopqrstuvwxyz", 8*26, &w);
18831883
NESSIEfinalize(&w, digest);
18841884
printf("The hash-code is the following 512-bit string.\n\n");
18851885
display(digest, DIGESTBYTES); printf("\n\n");
18861886

18871887
printf("6. In this example the data-string is the 62-byte string consisting of the ASCII-coded version of 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'.\n\n");
18881888
NESSIEinit(&w);
1889-
NESSIEadd("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", 8*62, &w);
1889+
NESSIEadd((u8*)"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", 8*62, &w);
18901890
NESSIEfinalize(&w, digest);
18911891
printf("The hash-code is the following 512-bit string.\n\n");
18921892
display(digest, DIGESTBYTES); printf("\n\n");
18931893

18941894
printf("7. In this example the data-string is the 80-byte string consisting of the ASCII-coded version of eight repetitions of '1234567890'.\n\n");
18951895
NESSIEinit(&w);
1896-
NESSIEadd("12345678901234567890123456789012345678901234567890123456789012345678901234567890", 8*80, &w);
1896+
NESSIEadd((u8*)"12345678901234567890123456789012345678901234567890123456789012345678901234567890", 8*80, &w);
18971897
NESSIEfinalize(&w, digest);
18981898
printf("The hash-code is the following 512-bit string.\n\n");
18991899
display(digest, DIGESTBYTES); printf("\n\n");
19001900

19011901
printf("8. In this example the data-string is the 32-byte string consisting of the ASCII-coded version of 'abcdbcdecdefdefgefghfghighijhijk'.\n\n");
19021902
NESSIEinit(&w);
1903-
NESSIEadd("abcdbcdecdefdefgefghfghighijhijk", 8*32, &w);
1903+
NESSIEadd((u8*)"abcdbcdecdefdefgefghfghighijhijk", 8*32, &w);
19041904
NESSIEfinalize(&w, digest);
19051905
printf("The hash-code is the following 512-bit string.\n\n");
19061906
display(digest, DIGESTBYTES); printf("\n\n");

0 commit comments

Comments
 (0)