9 unsigned char data
[] = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq";
10 unsigned long et
[] = {0x11223344};
13 printf("%d: 0x11 == %d and 0x44 == %d\n", ((unsigned char *)et
)[0],
17 if (!sha1
->readyToGo()) {
18 printf("Error: not ready to go!\n");
22 printf("About to process [%s]\n", data
);
23 rc
= sha1
->process(data
, strlen((char *)data
));
25 if (rc
!= strlen((char *)data
)) {
26 printf("Error processing the data. rc=%d\n", rc
);
27 } else printf("Done.\n");
29 const unsigned char *res
= sha1
->hash();
32 for (int i
= 0; i
< 20; i
++) {
33 printf("%.2X", *res
++);
34 if (i
>0 && (i
-1)%2 == 0) printf(" ");
37 } else printf("Error - getHash() returned NULL!\n");