summaryrefslogtreecommitdiff
path: root/poly1305.cpp
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2019-06-04 04:39:19 -0400
committerJeffrey Walton <noloader@gmail.com>2019-06-04 04:39:19 -0400
commit462bcc859de89905faeb0c031657369c94ce1bb5 (patch)
treed112e19a62bd78000c05fdd146e6b630ae6ef124 /poly1305.cpp
parenta644008679283325ba1b8abeee81fac015eb7f17 (diff)
downloadcryptopp-git-462bcc859de89905faeb0c031657369c94ce1bb5.tar.gz
Update Poly1305 nonce length check
Diffstat (limited to 'poly1305.cpp')
-rw-r--r--poly1305.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/poly1305.cpp b/poly1305.cpp
index 9f3f97aa..354d76c4 100644
--- a/poly1305.cpp
+++ b/poly1305.cpp
@@ -283,7 +283,7 @@ template <class T>
void Poly1305_Base<T>::Resynchronize(const byte *nonce, int nonceLength)
{
CRYPTOPP_ASSERT(nonceLength == -1 || nonceLength == (int)BLOCKSIZE);
- nonceLength == -1 ? nonceLength = BLOCKSIZE : nonceLength;
+ if (nonceLength == -1) { nonceLength = BLOCKSIZE; }
// Encrypt the nonce, stash in m_nk
m_cipher.ProcessBlock(nonce, m_nk.begin());