X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/1ed59855863174523aabfba933434950e051e00a..215e8e5fd8ac4478650cedde8d00dd529081938f:/src/src/hash.h diff --git a/src/src/hash.h b/src/src/hash.h index f1ebac467..337dc9910 100644 --- a/src/src/hash.h +++ b/src/src/hash.h @@ -12,7 +12,6 @@ #define HASH_H #include "sha_ver.h" -#include "blob.h" #ifdef SHA_OPENSSL # include @@ -30,9 +29,17 @@ /* Hash context for the exim_sha_* routines */ typedef enum hashmethod { + HASH_BADTYPE, HASH_SHA1, - HASH_SHA256, - HASH_SHA3 + + HASH_SHA2_256, + HASH_SHA2_384, + HASH_SHA2_512, + + HASH_SHA3_224, + HASH_SHA3_256, + HASH_SHA3_384, + HASH_SHA3_512, } hashmethod; typedef struct { @@ -42,7 +49,8 @@ typedef struct { #ifdef SHA_OPENSSL union { SHA_CTX sha1; /* SHA1 block */ - SHA256_CTX sha2; /* SHA256 block */ + SHA256_CTX sha2_256; /* SHA256 or 224 block */ + SHA512_CTX sha2_512; /* SHA512 or 384 block */ } u; #elif defined(SHA_GNUTLS) @@ -63,10 +71,9 @@ typedef struct { } hctx; -extern void exim_sha_init(hctx *, hashmethod); +extern BOOL exim_sha_init(hctx *, hashmethod); extern void exim_sha_update(hctx *, const uschar *a, int); extern void exim_sha_finish(hctx *, blob *); -extern int exim_sha_hashlen(hctx *); #endif /* End of File */