diff options
author | Jeffrey Walton <noloader@gmail.com> | 2016-01-25 00:12:37 -0500 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2016-01-25 00:12:37 -0500 |
commit | cdcff65a350895bf81bc245d71ed27866a34787c (patch) | |
tree | 47302621ce15b9072e8980d8e9674a304841a7e4 /vmac.cpp | |
parent | 475c574e5fc35adf74ba57e308d86e9d25531dc9 (diff) | |
download | cryptopp-git-cdcff65a350895bf81bc245d71ed27866a34787c.tar.gz |
Cleared -Wcast-align (Issue 122)
Diffstat (limited to 'vmac.cpp')
-rw-r--r-- | vmac.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 ¶ms)
{
- 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
{
|