summaryrefslogtreecommitdiff
path: root/iterhash.cpp
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2016-12-06 11:09:31 -0500
committerJeffrey Walton <noloader@gmail.com>2016-12-06 11:09:31 -0500
commitf19754966242c855f420b3f05bdccf35492f4185 (patch)
tree53c18833ae8e90c0dd8308adf32df3f355ea4ed8 /iterhash.cpp
parentbfc4bf9697d3dffe8130d8518945f71892e1bcef (diff)
downloadcryptopp-git-f19754966242c855f420b3f05bdccf35492f4185.tar.gz
Remove temporary array for SHA1. Whitespace and comments
Diffstat (limited to 'iterhash.cpp')
-rw-r--r--iterhash.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/iterhash.cpp b/iterhash.cpp
index a757a3e6..c674dd48 100644
--- a/iterhash.cpp
+++ b/iterhash.cpp
@@ -82,6 +82,9 @@ 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();