X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Fsrc%2Fhash.h;h=9e91f1aad776ad28b80448a0c1a294bf6f6c8c92;hb=493e0e6648552c0dce6c5225c8438d2829f1ac11;hp=89bedb926ebd804ee44d48f2f8f158231992564b;hpb=5fb822fc4839e253d2f839ba7966bc25a5329ac1;p=exim.git diff --git a/src/src/hash.h b/src/src/hash.h index 89bedb926..9e91f1aad 100644 --- a/src/src/hash.h +++ b/src/src/hash.h @@ -29,9 +29,19 @@ /* Hash context for the exim_sha_* routines */ +typedef enum hashmethod { + HASH_BADTYPE, + HASH_SHA1, + HASH_SHA256, + HASH_SHA3_224, + HASH_SHA3_256, + HASH_SHA3_384, + HASH_SHA3_512, +} hashmethod; + typedef struct { - BOOL is_sha1; - int hashlen; + hashmethod method; + int hashlen; #ifdef SHA_OPENSSL union { @@ -57,7 +67,7 @@ typedef struct { } hctx; -extern void exim_sha_init(hctx *, BOOL); +extern void 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 *);