summaryrefslogtreecommitdiff
path: root/blake2.cpp
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2018-11-21 13:28:21 -0500
committerJeffrey Walton <noloader@gmail.com>2018-11-21 13:28:21 -0500
commit322c67f373ecfa8f22e993ab49ed1dc490077f1f (patch)
treeafb45065b78dcbd34af018786c069c98dd6e243d /blake2.cpp
parent0d44176fd1c451a1ebbce2498b580d7c08c00c72 (diff)
downloadcryptopp-git-322c67f373ecfa8f22e993ab49ed1dc490077f1f.tar.gz
Use previous digest size as a default value in BLAKE2
Diffstat (limited to 'blake2.cpp')
-rw-r--r--blake2.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/blake2.cpp b/blake2.cpp
index a9bea136..c3d7b4b0 100644
--- a/blake2.cpp
+++ b/blake2.cpp
@@ -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);