X-Git-Url: https://vcs.fsf.org/?p=exim.git;a=blobdiff_plain;f=src%2Fsrc%2Fhash.h;h=5bd47acd1f14081ec64ecea688994ea869f42d8e;hp=09b65944d393f3ee6e392edc7b539062d41e1058;hb=bce15b62182d356f86e7a0bdbb513cbb22de1a20;hpb=d5c0d8c9374623620844d539d4810da63e9abca1 diff --git a/src/src/hash.h b/src/src/hash.h index 09b65944d..5bd47acd1 100644 --- a/src/src/hash.h +++ b/src/src/hash.h @@ -1,7 +1,7 @@ /* * Exim - an Internet mail transport agent * - * Copyright (C) 2016 Exim maintainers + * Copyright (C) 1995 - 2018 Exim maintainers * * Hash interface functions */ @@ -12,7 +12,6 @@ #define HASH_H #include "sha_ver.h" -#include "blob.h" #ifdef SHA_OPENSSL # include @@ -31,8 +30,13 @@ typedef enum hashmethod { HASH_BADTYPE, + HASH_NULL, HASH_SHA1, - HASH_SHA256, + + HASH_SHA2_256, + HASH_SHA2_384, + HASH_SHA2_512, + HASH_SHA3_224, HASH_SHA3_256, HASH_SHA3_384, @@ -46,7 +50,11 @@ 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 */ +#ifdef EXIM_HAVE_SHA3 + EVP_MD_CTX * mctx; /* SHA3 block */ +#endif } u; #elif defined(SHA_GNUTLS) @@ -70,7 +78,6 @@ typedef struct { 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 */