blob: 0bb1939c7e83f353f1ac054faa4c6df2388eaea6 (
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
25
26
|
/*
* Message Authentication Code base class
* (C) 1999-2008 Jack Lloyd
*
* Botan is released under the Simplified BSD License (see license.txt)
*/
#include <botan/mac.h>
#include <botan/mem_ops.h>
namespace Botan {
/*
* Default (deterministic) MAC verification operation
*/
bool MessageAuthenticationCode::verify_mac(const byte mac[], size_t length)
{
secure_vector<byte> our_mac = final();
if(our_mac.size() != length)
return false;
return same_mem(our_mac.data(), mac, length);
}
}
|