summaryrefslogtreecommitdiff
path: root/sha.cpp
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2020-12-26 03:16:42 -0500
committerJeffrey Walton <noloader@gmail.com>2020-12-26 03:16:42 -0500
commit0e117ee65b412728519bb38b0082d153428949e4 (patch)
tree6df107cdefc63bc3acb554dfc6e092c018634ce8 /sha.cpp
parent8eeaab2316f65c576c60e3f5aeb42441b5a5bcdb (diff)
downloadcryptopp-git-0e117ee65b412728519bb38b0082d153428949e4.tar.gz
Consistently use cryptogams_ prefix for Andy Polyakov's code (PR #952)
Diffstat (limited to 'sha.cpp')
-rw-r--r--sha.cpp48
1 files changed, 24 insertions, 24 deletions
diff --git a/sha.cpp b/sha.cpp
index aa3682be..30d6529f 100644
--- a/sha.cpp
+++ b/sha.cpp
@@ -67,8 +67,8 @@ extern void SHA256_HashMultipleBlocks_SHANI(word32 *state, const word32 *data, s
#endif
#if CRYPTOGAMS_ARM_SHA1
-extern "C" void sha1_block_data_order_ARM(word32* state, const word32 *data, size_t blocks);
-extern "C" void sha1_block_data_order_neon(word32* state, const word32 *data, size_t blocks);
+extern "C" void cryptogams_sha1_block_data_order(word32* state, const word32 *data, size_t blocks);
+extern "C" void cryptogams_sha1_block_data_order_neon(word32* state, const word32 *data, size_t blocks);
#endif
#if CRYPTOPP_ARM_SHA1_AVAILABLE
@@ -80,8 +80,8 @@ extern void SHA256_HashMultipleBlocks_ARMV8(word32 *state, const word32 *data, s
#endif
#if CRYPTOGAMS_ARM_SHA256
-extern "C" void sha256_block_data_order(word32* state, const word32 *data, size_t blocks);
-extern "C" void sha256_block_data_order_neon(word32* state, const word32 *data, size_t blocks);
+extern "C" void cryptogams_sha256_block_data_order(word32* state, const word32 *data, size_t blocks);
+extern "C" void cryptogams_sha256_block_data_order_neon(word32* state, const word32 *data, size_t blocks);
#endif
#if CRYPTOPP_ARM_SHA512_AVAILABLE
@@ -94,8 +94,8 @@ extern void SHA512_HashMultipleBlocks_POWER8(word64 *state, const word64 *data,
#endif
#if CRYPTOGAMS_ARM_SHA512
-extern "C" void sha512_block_data_order(word64* state, const word64 *data, size_t blocks);
-extern "C" void sha512_block_data_order_neon(word64* state, const word64 *data, size_t blocks);
+extern "C" void cryptogams_sha512_block_data_order(word64* state, const word64 *data, size_t blocks);
+extern "C" void cryptogams_sha512_block_data_order_neon(word64* state, const word64 *data, size_t blocks);
#endif
// We add extern to export table to sha_simd.cpp, but it
@@ -297,9 +297,9 @@ void SHA1::Transform(word32 *state, const word32 *data)
# if defined(CRYPTOPP_LITTLE_ENDIAN)
word32 dataBuf[16];
ByteReverse(dataBuf, data, SHA1::BLOCKSIZE);
- sha1_block_data_order_neon(state, data, 1);
+ cryptogams_sha1_block_data_order_neon(state, data, 1);
# else
- sha1_block_data_order_neon(state, data, 1);
+ cryptogams_sha1_block_data_order_neon(state, data, 1);
# endif
return;
}
@@ -308,9 +308,9 @@ void SHA1::Transform(word32 *state, const word32 *data)
# if defined(CRYPTOPP_LITTLE_ENDIAN)
word32 dataBuf[16];
ByteReverse(dataBuf, data, SHA1::BLOCKSIZE);
- sha1_block_data_order_ARM(state, data, 1);
+ cryptogams_sha1_block_data_order(state, data, 1);
# else
- sha1_block_data_order_ARM(state, data, 1);
+ cryptogams_sha1_block_data_order(state, data, 1);
# endif
return;
}
@@ -341,12 +341,12 @@ size_t SHA1::HashMultipleBlocks(const word32 *input, size_t length)
#if CRYPTOGAMS_ARM_SHA1
if (HasNEON())
{
- sha1_block_data_order_neon(m_state, input, length / SHA1::BLOCKSIZE);
+ cryptogams_sha1_block_data_order_neon(m_state, input, length / SHA1::BLOCKSIZE);
return length & (SHA1::BLOCKSIZE - 1);
}
if (HasARMv7())
{
- sha1_block_data_order_ARM(m_state, input, length / SHA1::BLOCKSIZE);
+ cryptogams_sha1_block_data_order(m_state, input, length / SHA1::BLOCKSIZE);
return length & (SHA1::BLOCKSIZE - 1);
}
#endif
@@ -858,9 +858,9 @@ void SHA256::Transform(word32 *state, const word32 *data)
# if defined(CRYPTOPP_LITTLE_ENDIAN)
word32 dataBuf[16];
ByteReverse(dataBuf, data, SHA256::BLOCKSIZE);
- sha256_block_data_order_neon(state, data, 1);
+ cryptogams_sha256_block_data_order_neon(state, data, 1);
# else
- sha256_block_data_order_neon(state, data, 1);
+ cryptogams_sha256_block_data_order_neon(state, data, 1);
# endif
return;
}
@@ -869,9 +869,9 @@ void SHA256::Transform(word32 *state, const word32 *data)
# if defined(CRYPTOPP_LITTLE_ENDIAN)
word32 dataBuf[16];
ByteReverse(dataBuf, data, SHA256::BLOCKSIZE);
- sha256_block_data_order(state, data, 1);
+ cryptogams_sha256_block_data_order(state, data, 1);
# else
- sha256_block_data_order(state, data, 1);
+ cryptogams_sha256_block_data_order(state, data, 1);
# endif
return;
}
@@ -917,12 +917,12 @@ size_t SHA256::HashMultipleBlocks(const word32 *input, size_t length)
#if CRYPTOGAMS_ARM_SHA256
if (HasNEON())
{
- sha256_block_data_order_neon(m_state, input, length / SHA256::BLOCKSIZE);
+ cryptogams_sha256_block_data_order_neon(m_state, input, length / SHA256::BLOCKSIZE);
return length & (SHA256::BLOCKSIZE - 1);
}
if (HasARMv7())
{
- sha256_block_data_order(m_state, input, length / SHA256::BLOCKSIZE);
+ cryptogams_sha256_block_data_order(m_state, input, length / SHA256::BLOCKSIZE);
return length & (SHA256::BLOCKSIZE - 1);
}
#endif
@@ -985,12 +985,12 @@ size_t SHA224::HashMultipleBlocks(const word32 *input, size_t length)
#if CRYPTOGAMS_ARM_SHA256
if (HasNEON())
{
- sha256_block_data_order_neon(m_state, input, length / SHA256::BLOCKSIZE);
+ cryptogams_sha256_block_data_order_neon(m_state, input, length / SHA256::BLOCKSIZE);
return length & (SHA256::BLOCKSIZE - 1);
}
if (HasARMv7())
{
- sha256_block_data_order(m_state, input, length / SHA256::BLOCKSIZE);
+ cryptogams_sha256_block_data_order(m_state, input, length / SHA256::BLOCKSIZE);
return length & (SHA256::BLOCKSIZE - 1);
}
#endif
@@ -1356,9 +1356,9 @@ void SHA512::Transform(word64 *state, const word64 *data)
# if (CRYPTOPP_LITTLE_ENDIAN)
word64 dataBuf[16];
ByteReverse(dataBuf, data, SHA512::BLOCKSIZE);
- sha512_block_data_order_neon(state, dataBuf, 1);
+ cryptogams_sha512_block_data_order_neon(state, dataBuf, 1);
# else
- sha512_block_data_order_neon(state, data, 1);
+ cryptogams_sha512_block_data_order_neon(state, data, 1);
# endif
return;
}
@@ -1367,9 +1367,9 @@ void SHA512::Transform(word64 *state, const word64 *data)
# if (CRYPTOPP_LITTLE_ENDIAN)
word64 dataBuf[16];
ByteReverse(dataBuf, data, SHA512::BLOCKSIZE);
- sha512_block_data_order(state, dataBuf, 1);
+ cryptogams_sha512_block_data_order(state, dataBuf, 1);
# else
- sha512_block_data_order(state, data, 1);
+ cryptogams_sha512_block_data_order(state, data, 1);
# endif
return;
}