diff options
author | Jeffrey Walton <noloader@gmail.com> | 2017-05-26 01:51:44 -0400 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2017-05-26 01:51:44 -0400 |
commit | de1270656c275074dfc6c013484c157e9d62277b (patch) | |
tree | b1aec7235e9cf59b223f3240fa0187f2feb64dfa /iterhash.cpp | |
parent | bd7aa155a6c78e6e4381b883ccfca7c6ad1ad983 (diff) | |
download | cryptopp-git-de1270656c275074dfc6c013484c157e9d62277b.tar.gz |
Avoid extra ByteReverse when using Intel SHA extensions
This gains about 0.6 cpb. SHA-1 is down to 1.7 to 1.9 cpb. SHA-256 is not affected
Diffstat (limited to 'iterhash.cpp')
-rw-r--r-- | iterhash.cpp | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/iterhash.cpp b/iterhash.cpp index bdc99ec5..eedd5172 100644 --- a/iterhash.cpp +++ b/iterhash.cpp @@ -83,9 +83,6 @@ template <class T, class BASE> byte * IteratedHashBase<T, BASE>::CreateUpdateSpa template <class T, class BASE> size_t IteratedHashBase<T, BASE>::HashMultipleBlocks(const T *input, size_t length)
{
- // Hardware based SHA1 and SHA256 correct blocks themselves due to hardware requirements.
- // For Intel, SHA1 will effectively call ByteReverse(). SHA256 formats data to Intel
- // requirements, which means eight words ABCD EFGH are transformed to ABEF CDGH.
unsigned int blockSize = this->BlockSize();
bool noReverse = NativeByteOrderIs(this->GetByteOrder());
T* dataBuf = this->DataBuf();
|