aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/hash/sha1/sha160.cpp
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2017-01-17 16:28:20 -0500
committerJack Lloyd <[email protected]>2017-05-20 11:11:27 -0400
commit455a39f70e6de8376f78f318f04d07af7d245be3 (patch)
treed71becdefdb712c529bc04218ae51b44b46f1b59 /src/lib/hash/sha1/sha160.cpp
parentb7200c05c6fe841cd5f4a5942a5be3d63124914e (diff)
Add ARMv8 SHA-1 support
Based on patch from Jeffrey Walton in GH #840 Only tested in qemu so far.
Diffstat (limited to 'src/lib/hash/sha1/sha160.cpp')
-rw-r--r--src/lib/hash/sha1/sha160.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lib/hash/sha1/sha160.cpp b/src/lib/hash/sha1/sha160.cpp
index 13f9c24d7..6ebdba73f 100644
--- a/src/lib/hash/sha1/sha160.cpp
+++ b/src/lib/hash/sha1/sha160.cpp
@@ -68,6 +68,13 @@ void SHA_160::compress_n(const uint8_t input[], size_t blocks)
}
#endif
+#if defined(BOTAN_HAS_SHA1_ARMV8)
+ if(CPUID::has_arm_sha1())
+ {
+ return sha1_armv8_compress_n(m_digest, input, blocks);
+ }
+#endif
+
#if defined(BOTAN_HAS_SHA1_SSE2)
if(CPUID::has_sse2())
{