diff options
author | Jeffrey Walton <noloader@gmail.com> | 2016-12-01 21:52:01 -0500 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2016-12-01 21:52:01 -0500 |
commit | 406bec8fc7b8825f974a36ddea91e16b00d66f62 (patch) | |
tree | d3993e823a79f53ff799a23688da1aeaf09065a1 /poly1305.cpp | |
parent | d91244a6575fd2abaf5806ab9b8016faf311486c (diff) | |
download | cryptopp-git-406bec8fc7b8825f974a36ddea91e16b00d66f62.tar.gz |
Backed-off assert for poly1305.cpp in Debug builds
Diffstat (limited to 'poly1305.cpp')
-rw-r--r-- | poly1305.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/poly1305.cpp b/poly1305.cpp index b2a68dd7..e79cf386 100644 --- a/poly1305.cpp +++ b/poly1305.cpp @@ -15,7 +15,7 @@ NAMESPACE_BEGIN(CryptoPP) template <class T>
void Poly1305_Base<T>::UncheckedSetKey(const byte *key, unsigned int length, const NameValuePairs ¶ms)
{
- if(key && length)
+ if (key && length)
{
// key is {k,r} pair, r is 16 bytes
length = SaturatingSubtract(length, (unsigned)BLOCKSIZE);
@@ -32,7 +32,7 @@ void Poly1305_Base<T>::UncheckedSetKey(const byte *key, unsigned int length, con }
ConstByteArrayParameter t;
- if(params.GetValue(Name::IV(), t) && t.begin() && t.size())
+ if (params.GetValue(Name::IV(), t) && t.begin() && t.size())
{
SecByteBlock nk(16);
m_cipher.ProcessBlock(t.begin(), nk);
@@ -51,7 +51,8 @@ void Poly1305_Base<T>::UncheckedSetKey(const byte *key, unsigned int length, con template <class T>
void Poly1305_Base<T>::Update(const byte *input, size_t length)
{
- CRYPTOPP_ASSERT((input && length) || !(input || length));
+ CRYPTOPP_ASSERT((input && length) || !length);
+ if (!length) return;
size_t rem, num = m_idx;
if (num)
|