diff options
author | Jack Lloyd <[email protected]> | 2017-05-19 12:30:20 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2017-05-19 12:30:20 -0400 |
commit | 7d1bef2a8fa081f9896eebbba6ae37e273c91099 (patch) | |
tree | 2a1bfad548b91757d7373a83cff67ae7c94810a9 /src/lib/hash/sha1/sha160.cpp | |
parent | b0fbcf8d24fb1c677aad3d2cfdd0c18274493f07 (diff) | |
parent | 7f019174bfcf3c2b31bda74fe40ce35727db1cef (diff) |
Merge GH #826 Add support for Intel SHA instructions
Diffstat (limited to 'src/lib/hash/sha1/sha160.cpp')
-rw-r--r-- | src/lib/hash/sha1/sha160.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lib/hash/sha1/sha160.cpp b/src/lib/hash/sha1/sha160.cpp index 735789cab..13f9c24d7 100644 --- a/src/lib/hash/sha1/sha160.cpp +++ b/src/lib/hash/sha1/sha160.cpp @@ -61,6 +61,13 @@ void SHA_160::compress_n(const uint8_t input[], size_t blocks) { using namespace SHA1_F; +#if defined(BOTAN_HAS_SHA1_X86_SHA_NI) + if(CPUID::has_intel_sha()) + { + return sha1_compress_x86(m_digest, input, blocks); + } +#endif + #if defined(BOTAN_HAS_SHA1_SSE2) if(CPUID::has_sse2()) { |