diff options
author | Jeffrey Walton <noloader@gmail.com> | 2018-11-21 13:28:21 -0500 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2018-11-21 13:28:21 -0500 |
commit | 322c67f373ecfa8f22e993ab49ed1dc490077f1f (patch) | |
tree | afb45065b78dcbd34af018786c069c98dd6e243d /blake2.cpp | |
parent | 0d44176fd1c451a1ebbce2498b580d7c08c00c72 (diff) | |
download | cryptopp-git-322c67f373ecfa8f22e993ab49ed1dc490077f1f.tar.gz |
Use previous digest size as a default value in BLAKE2
Diffstat (limited to 'blake2.cpp')
-rw-r--r-- | blake2.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -389,7 +389,7 @@ void BLAKE2s::UncheckedSetKey(const byte *key, unsigned int length, const Crypto m_keyLength = 0;
}
- m_digestSize = params.GetIntValueWithDefault(Name::DigestSize(), DIGESTSIZE);
+ m_digestSize = params.GetIntValueWithDefault(Name::DigestSize(), m_digestSize);
m_state.Reset();
m_block.Reset(m_digestSize, m_keyLength);
@@ -420,7 +420,7 @@ void BLAKE2b::UncheckedSetKey(const byte *key, unsigned int length, const Crypto m_keyLength = 0;
}
- m_digestSize = params.GetIntValueWithDefault(Name::DigestSize(), DIGESTSIZE);
+ m_digestSize = params.GetIntValueWithDefault(Name::DigestSize(), m_digestSize);
m_state.Reset();
m_block.Reset(m_digestSize, m_keyLength);
|