aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/hash/sha2_32/sha2_32.h
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2017-05-19 12:30:20 -0400
committerJack Lloyd <[email protected]>2017-05-19 12:30:20 -0400
commit7d1bef2a8fa081f9896eebbba6ae37e273c91099 (patch)
tree2a1bfad548b91757d7373a83cff67ae7c94810a9 /src/lib/hash/sha2_32/sha2_32.h
parentb0fbcf8d24fb1c677aad3d2cfdd0c18274493f07 (diff)
parent7f019174bfcf3c2b31bda74fe40ce35727db1cef (diff)
Merge GH #826 Add support for Intel SHA instructions
Diffstat (limited to 'src/lib/hash/sha2_32/sha2_32.h')
-rw-r--r--src/lib/hash/sha2_32/sha2_32.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/lib/hash/sha2_32/sha2_32.h b/src/lib/hash/sha2_32/sha2_32.h
index 78e08c97a..5a687efbe 100644
--- a/src/lib/hash/sha2_32/sha2_32.h
+++ b/src/lib/hash/sha2_32/sha2_32.h
@@ -48,6 +48,7 @@ class BOTAN_DLL SHA_256 final : public MDx_HashFunction
SHA_256() : MDx_HashFunction(64, true, true), m_digest(8)
{ clear(); }
+
private:
void compress_n(const uint8_t[], size_t blocks) override;
void copy_out(uint8_t[]) override;
@@ -55,6 +56,13 @@ class BOTAN_DLL SHA_256 final : public MDx_HashFunction
secure_vector<uint32_t> m_digest;
};
+#if defined(BOTAN_HAS_SHA2_32_X86)
+/*
+* SHA-256 compression using Goldmont x86 extensions. Not for public consumption.
+*/
+void sha2_compress_x86(uint32_t digest[8], const uint8_t input[], size_t blocks);
+#endif
+
}
#endif