]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
Define SHA*_DIGEST_SIZE symbols.
authorSimon Josefsson <simon@josefsson.org>
Mon, 3 Mar 2008 07:52:42 +0000 (08:52 +0100)
committerJim Meyering <meyering@redhat.com>
Mon, 3 Mar 2008 07:56:52 +0000 (08:56 +0100)
* gl/lib/sha256.h (SHA224_DIGEST_SIZE, SHA256_DIGEST_SIZE): Define.
* gl/lib/sha512.h (SHA384_DIGEST_SIZE, SHA512_DIGEST_SIZE): Define.

gl/lib/sha256.h
gl/lib/sha512.h

index 9fd83c94cf5d36275a55938a6ae989d2bfac0577..c35d6c1fe335f3587c0a53f08843b04eefeb2edb 100644 (file)
@@ -31,6 +31,8 @@ struct sha256_ctx
   uint32_t buffer[32];
 };
 
+enum { SHA224_DIGEST_SIZE = 24 };
+enum { SHA256_DIGEST_SIZE = 32 };
 
 /* Initialize structure containing state of computation. */
 extern void sha256_init_ctx (struct sha256_ctx *ctx);
index 7ee3ac4f86179f661a823e6c81a8319bbc90e874..84fe5591f04deea4113c760c749b8fb746c59786 100644 (file)
@@ -32,6 +32,8 @@ struct sha512_ctx
   u64 buffer[32];
 };
 
+enum { SHA384_DIGEST_SIZE = 48 };
+enum { SHA512_DIGEST_SIZE = 64 };
 
 /* Initialize structure containing state of computation. */
 extern void sha512_init_ctx (struct sha512_ctx *ctx);