diff options
author | Igor Pavlov <ipavlov@users.sourceforge.net> | 2008-08-13 04:00:00 +0400 |
---|---|---|
committer | Kornel LesiĆski <kornel@geekhood.net> | 2016-05-28 02:15:56 +0300 |
commit | 173c07e166fdf6fcd20f18ea73008f1b628945df (patch) | |
tree | 13ebea85cdc4c16ae93714ff0627ee9f91ad7e08 /CPP/7zip/Crypto/Hash/Sha1.cpp | |
parent | 3901bf0ab88106a5b031cba7bc18d60cdebf7eef (diff) |
4.59 beta
Diffstat (limited to 'CPP/7zip/Crypto/Hash/Sha1.cpp')
-rwxr-xr-x | CPP/7zip/Crypto/Hash/Sha1.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/CPP/7zip/Crypto/Hash/Sha1.cpp b/CPP/7zip/Crypto/Hash/Sha1.cpp index 8d56b3dc..2962c654 100755 --- a/CPP/7zip/Crypto/Hash/Sha1.cpp +++ b/CPP/7zip/Crypto/Hash/Sha1.cpp @@ -1,12 +1,12 @@ // Sha1.cpp -// This file is based on public domain +// This file is based on public domain // Steve Reid and Wei Dai's code from Crypto++ #include "StdAfx.h" #include "Sha1.h" -extern "C" -{ +extern "C" +{ #include "../../../../C/RotateDefs.h" } @@ -16,7 +16,7 @@ namespace NSha1 { // define it for speed optimization // #define _SHA1_UNROLL -static const unsigned int kNumW = +static const unsigned int kNumW = #ifdef _SHA1_UNROLL 16; #else @@ -79,9 +79,9 @@ void CContextBase::GetBlockDigest(UInt32 *data, UInt32 *destDigest, bool returnR #ifdef _SHA1_UNROLL - RX_5(R2, 20); RX_5(R2, 25); RX_5(R2, 30); RX_5(R2, 35); - RX_5(R3, 40); RX_5(R3, 45); RX_5(R3, 50); RX_5(R3, 55); - RX_5(R4, 60); RX_5(R4, 65); RX_5(R4, 70); RX_5(R4, 75); + RX_5(R2, 20); RX_5(R2, 25); RX_5(R2, 30); RX_5(R2, 35); + RX_5(R3, 40); RX_5(R3, 45); RX_5(R3, 50); RX_5(R3, 55); + RX_5(R4, 60); RX_5(R4, 65); RX_5(R4, 70); RX_5(R4, 75); #else i = 20; for (; i < 40; i += 5) { RX_5(R2, i); } @@ -101,7 +101,7 @@ void CContextBase::GetBlockDigest(UInt32 *data, UInt32 *destDigest, bool returnR // Wipe variables // a = b = c = d = e = 0; -} +} void CContextBase::PrepareBlock(UInt32 *block, unsigned int size) const { @@ -165,7 +165,7 @@ void CContext::Final(Byte *digest) UpdateBlock(); int i; - for (i = 0; i < kDigestSizeInWords; i++) + for (i = 0; i < kDigestSizeInWords; i++) { UInt32 state = _state[i] & 0xFFFFFFFF; *digest++ = (Byte)(state >> 24); |