From: Simon Josefsson Date: Mon, 3 Mar 2008 07:52:42 +0000 (+0100) Subject: Define SHA*_DIGEST_SIZE symbols. X-Git-Tag: v6.11~102 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=dcc543f44c56d1b5793e4fcc1f3ef9bfb5e4ee54;p=thirdparty%2Fcoreutils.git Define SHA*_DIGEST_SIZE symbols. * gl/lib/sha256.h (SHA224_DIGEST_SIZE, SHA256_DIGEST_SIZE): Define. * gl/lib/sha512.h (SHA384_DIGEST_SIZE, SHA512_DIGEST_SIZE): Define. --- diff --git a/gl/lib/sha256.h b/gl/lib/sha256.h index 9fd83c94cf..c35d6c1fe3 100644 --- a/gl/lib/sha256.h +++ b/gl/lib/sha256.h @@ -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); diff --git a/gl/lib/sha512.h b/gl/lib/sha512.h index 7ee3ac4f86..84fe5591f0 100644 --- a/gl/lib/sha512.h +++ b/gl/lib/sha512.h @@ -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);