]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
test_sha1: update helper
authorKarel Zak <kzak@redhat.com>
Tue, 12 Dec 2017 10:38:17 +0000 (11:38 +0100)
committerKarel Zak <kzak@redhat.com>
Thu, 14 Dec 2017 14:48:07 +0000 (15:48 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
tests/helpers/test_sha1.c

index 5a1972935748af17278e891dbea81fabf8f0e7f9..ad96da4f001023766591ea1d0989476ec77266c0 100644 (file)
@@ -7,22 +7,22 @@
 int main(void)
 {
        int i, ret;
-       SHA1_CTX ctx;
-       unsigned char digest[SHA1LENGTH];
+       UL_SHA1_CTX ctx;
+       unsigned char digest[UL_SHA1LENGTH];
        unsigned char buf[BUFSIZ];
 
-       SHA1Init( &ctx );
+       ul_SHA1Init( &ctx );
 
        while(!feof(stdin) && !ferror(stdin)) {
                ret = fread(buf, 1, sizeof(buf), stdin);
                if (ret)
-                       SHA1Update( &ctx, buf, ret );
+                       ul_SHA1Update( &ctx, buf, ret );
        }
 
        fclose(stdin);
-       SHA1Final( digest, &ctx );
+       ul_SHA1Final( digest, &ctx );
 
-       for (i = 0; i < SHA1LENGTH; i++)
+       for (i = 0; i < UL_SHA1LENGTH; i++)
                printf( "%02x", digest[i] );
        printf("\n");
        return 0;