summaryrefslogtreecommitdiff
path: root/cipher/sha1.h
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2016-03-31 19:16:15 +0200
committerWerner Koch <wk@gnupg.org>2016-03-31 19:16:15 +0200
commit142a479a484cb4e84d0561be9b05b44dac9e6fe2 (patch)
tree380a61759ef2975dea01d2e2df5d1b9cbf745478 /cipher/sha1.h
parent48ee918400762281bec5b6fc218a9f0d119aac7c (diff)
downloadlibgcrypt-142a479a484cb4e84d0561be9b05b44dac9e6fe2.tar.gz
cipher: Move sha1 context definition to a separate file.
* cipher/sha1.c: Replace hash-common.h by sha1.h. (SHA1_CONTEXT): Move to ... * cipher/sha1.h: new. Always include all flags. * cipher/Makefile.am (libcipher_la_SOURCES): Add sha1.h. -- Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'cipher/sha1.h')
-rw-r--r--cipher/sha1.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/cipher/sha1.h b/cipher/sha1.h
new file mode 100644
index 00000000..c023e15c
--- /dev/null
+++ b/cipher/sha1.h
@@ -0,0 +1,36 @@
+/* sha1.h - SHA-1 context definition
+ * Copyright (C) 1998, 2001, 2002, 2003, 2008 Free Software Foundation, Inc.
+ *
+ * This file is part of Libgcrypt.
+ *
+ * Libgcrypt is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * Libgcrypt is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, see <http://www.gnu.org/licenses/>.
+ */
+#ifndef GCRY_SHA1_H
+#define GCRY_SHA1_H
+
+#include "hash-common.h"
+
+/* We need this here for direct use by random-csprng.c. */
+typedef struct
+{
+ gcry_md_block_ctx_t bctx;
+ u32 h0,h1,h2,h3,h4;
+ unsigned int use_ssse3:1;
+ unsigned int use_avx:1;
+ unsigned int use_bmi2:1;
+ unsigned int use_neon:1;
+} SHA1_CONTEXT;
+
+
+#endif /*GCRY_SHA1_H*/