summaryrefslogtreecommitdiff
path: root/sha.cpp
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2019-05-19 16:51:40 -0400
committerJeffrey Walton <noloader@gmail.com>2019-05-19 16:51:40 -0400
commite19a6152b5b45a40a9380766309299872791ecdd (patch)
tree074560672f4e76382e7a3591302a56986d7a0929 /sha.cpp
parent62d53e6c446688c9ccdcafed20e8ac6400fdcd16 (diff)
downloadcryptopp-git-e19a6152b5b45a40a9380766309299872791ecdd.tar.gz
Return CRYPTOGAMS_armcaps in CryptogamsArmCaps
Diffstat (limited to 'sha.cpp')
-rw-r--r--sha.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/sha.cpp b/sha.cpp
index 6262a023..d50ad628 100644
--- a/sha.cpp
+++ b/sha.cpp
@@ -170,7 +170,7 @@ const word32 SHA256_K[64] = {
ANONYMOUS_NAMESPACE_BEGIN
#if CRYPTOGAMS_ARM_SHA1 || CRYPTOGAMS_ARM_SHA256 || CRYPTOGAMS_ARM_SHA512
-inline bool CryptogamsArmCaps()
+inline unsigned int CryptogamsArmCaps()
{
// The Cryptogams code uses a global variable named CRYPTOGAMS_armcaps
// for capabilities like ARMv7 and NEON. Storage is allocated in the
@@ -178,7 +178,7 @@ inline bool CryptogamsArmCaps()
// The Cryptogams code defines NEON as 1<<0; see ARMV7_NEON.
*const_cast<volatile unsigned int*>(&CRYPTOGAMS_armcaps) = CryptoPP::HasNEON() ? (1<<0) : 0;
- return true;
+ return CRYPTOGAMS_armcaps;
}
#endif
@@ -310,8 +310,8 @@ void SHA1::Transform(word32 *state, const word32 *data)
#if CRYPTOGAMS_ARM_SHA1 && 0
if (HasARMv7())
{
- static const bool unused = CryptogamsArmCaps();
- CRYPTOPP_UNUSED(unused);
+ static const unsigned int caps = CryptogamsArmCaps();
+ CRYPTOPP_UNUSED(caps);
# if defined(CRYPTOPP_LITTLE_ENDIAN)
word32 dataBuf[16];
@@ -349,8 +349,8 @@ size_t SHA1::HashMultipleBlocks(const word32 *input, size_t length)
#if CRYPTOGAMS_ARM_SHA1
if (HasARMv7())
{
- static const bool unused = CryptogamsArmCaps();
- CRYPTOPP_UNUSED(unused);
+ static const unsigned int caps = CryptogamsArmCaps();
+ CRYPTOPP_UNUSED(caps);
sha1_block_data_order(m_state, input, length / SHA1::BLOCKSIZE);
return length & (SHA1::BLOCKSIZE - 1);
@@ -861,8 +861,8 @@ void SHA256::Transform(word32 *state, const word32 *data)
#if CRYPTOGAMS_ARM_SHA256 && 0
if (HasARMv7())
{
- static const bool unused = CryptogamsArmCaps();
- CRYPTOPP_UNUSED(unused);
+ static const unsigned int caps = CryptogamsArmCaps();
+ CRYPTOPP_UNUSED(caps);
# if defined(CRYPTOPP_LITTLE_ENDIAN)
word32 dataBuf[16];
@@ -915,8 +915,8 @@ size_t SHA256::HashMultipleBlocks(const word32 *input, size_t length)
#if CRYPTOGAMS_ARM_SHA256
if (HasARMv7())
{
- static const bool unused = CryptogamsArmCaps();
- CRYPTOPP_UNUSED(unused);
+ static const unsigned int caps = CryptogamsArmCaps();
+ CRYPTOPP_UNUSED(caps);
sha256_block_data_order(m_state, input, length / SHA256::BLOCKSIZE);
return length & (SHA256::BLOCKSIZE - 1);
@@ -981,8 +981,8 @@ size_t SHA224::HashMultipleBlocks(const word32 *input, size_t length)
#if CRYPTOGAMS_ARM_SHA256
if (HasARMv7())
{
- static const bool unused = CryptogamsArmCaps();
- CRYPTOPP_UNUSED(unused);
+ static const unsigned int caps = CryptogamsArmCaps();
+ CRYPTOPP_UNUSED(caps);
sha256_block_data_order(m_state, input, length / SHA256::BLOCKSIZE);
return length & (SHA256::BLOCKSIZE - 1);
@@ -1347,8 +1347,8 @@ void SHA512::Transform(word64 *state, const word64 *data)
#if CRYPTOGAMS_ARM_SHA512 && 0
if (HasARMv7())
{
- static const bool unused = CryptogamsArmCaps();
- CRYPTOPP_UNUSED(unused);
+ static const unsigned int caps = CryptogamsArmCaps();
+ CRYPTOPP_UNUSED(caps);
# if defined(CRYPTOPP_LITTLE_ENDIAN)
word64 dataBuf[16];