blob: 63be1ea179e386ca266a130e216b2c94e28c7fd3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
/**
Message Authentication Code base class
(C) 1999-2008 Jack Lloyd
*/
#include <botan/mac.h>
namespace Botan {
/**
* Default (deterministic) MAC verification operation
*/
bool MessageAuthenticationCode::verify_mac(const byte mac[], u32bit length)
{
SecureVector<byte> our_mac = final();
if(our_mac.size() != length)
return false;
for(u32bit j = 0; j != length; ++j)
if(mac[j] != our_mac[j])
return false;
return true;
}
}
|