summaryrefslogtreecommitdiff
path: root/vmac.cpp
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2016-01-25 00:12:37 -0500
committerJeffrey Walton <noloader@gmail.com>2016-01-25 00:12:37 -0500
commitcdcff65a350895bf81bc245d71ed27866a34787c (patch)
tree47302621ce15b9072e8980d8e9674a304841a7e4 /vmac.cpp
parent475c574e5fc35adf74ba57e308d86e9d25531dc9 (diff)
downloadcryptopp-git-cdcff65a350895bf81bc245d71ed27866a34787c.tar.gz
Cleared -Wcast-align (Issue 122)
Diffstat (limited to 'vmac.cpp')
-rw-r--r--vmac.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/vmac.cpp b/vmac.cpp
index b508834c..c3c97cfe 100644
--- a/vmac.cpp
+++ b/vmac.cpp
@@ -47,8 +47,6 @@ static const word128 m126 = (word128(m62)<<64)|m64; /* 126-bit mask */
void VMAC_Base::UncheckedSetKey(const byte *userKey, unsigned int keylength, const NameValuePairs &params)
{
- assert(IsAlignedOn(m_l3Key(),GetAlignmentOf<word64>()));
-
int digestLength = params.GetIntValueWithDefault(Name::DigestSize(), DefaultDigestSize());
if (digestLength != 8 && digestLength != 16)
throw InvalidArgument("VMAC: DigestSize must be 8 or 16");
@@ -89,6 +87,8 @@ void VMAC_Base::UncheckedSetKey(const byte *userKey, unsigned int keylength, con
in[0] = 0xE0;
in[15] = 0;
word64 *l3Key = m_l3Key();
+ assert(IsAlignedOn(l3Key,GetAlignmentOf<word64>()));
+
for (i = 0; i <= (size_t)m_is128; i++)
do
{