SPDX: Mass-update to GPL-2.0-or-later
[exim.git] / src / src / hash.h
index 337dc991063460fe35f9b4f0d898303c70f8638b..788c9f0ad6571cb9700bcc4b905c744119362a44 100644 (file)
@@ -1,7 +1,7 @@
 /*
  *  Exim - an Internet mail transport agent
- *
- *  Copyright (C) 2016  Exim maintainers
+ *  Copyright (c) The Exim Maintainers 1995 - 2022
+ *  SPDX-License-Identifier: GPL-2.0-or-later
  *
  *  Hash interface functions
  */
@@ -30,6 +30,7 @@
 
 typedef enum hashmethod {
   HASH_BADTYPE,
+  HASH_NULL,
   HASH_SHA1,
 
   HASH_SHA2_256,
@@ -51,6 +52,9 @@ typedef struct {
     SHA_CTX      sha1;       /* SHA1 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)
@@ -73,6 +77,7 @@ typedef struct {
 
 extern BOOL     exim_sha_init(hctx *, hashmethod);
 extern void     exim_sha_update(hctx *, const uschar *a, int);
+extern void     exim_sha_update_string(hctx *, const uschar *a);
 extern void     exim_sha_finish(hctx *, blob *);
 
 #endif