aboutsummaryrefslogtreecommitdiffstats
path: root/src/mac/cmac
diff options
context:
space:
mode:
authorlloyd <[email protected]>2012-05-18 20:32:36 +0000
committerlloyd <[email protected]>2012-05-18 20:32:36 +0000
commitc691561f3198f481c13457433efbccc1c9fcd898 (patch)
treea45ea2c5a30e0cb009fbcb68a61ef39332ff790c /src/mac/cmac
parentd76700f01c7ecac5633edf75f8d7408b46c5dbac (diff)
Fairly huge update that replaces the old secmem types with std::vector
using a custom allocator. Currently our allocator just does new/delete with a memset before deletion, and the mmap and mlock allocators have been removed.
Diffstat (limited to 'src/mac/cmac')
-rw-r--r--src/mac/cmac/cmac.cpp4
-rw-r--r--src/mac/cmac/cmac.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/mac/cmac/cmac.cpp b/src/mac/cmac/cmac.cpp
index 7cd53f578..00120cf14 100644
--- a/src/mac/cmac/cmac.cpp
+++ b/src/mac/cmac/cmac.cpp
@@ -13,12 +13,12 @@ namespace Botan {
/*
* Perform CMAC's multiplication in GF(2^n)
*/
-SecureVector<byte> CMAC::poly_double(const MemoryRegion<byte>& in,
+secure_vector<byte> CMAC::poly_double(const secure_vector<byte>& in,
byte polynomial)
{
const byte poly_xor = (in[0] & 0x80) ? polynomial : 0;
- SecureVector<byte> out = in;
+ secure_vector<byte> out = in;
byte carry = 0;
for(size_t i = out.size(); i != 0; --i)
diff --git a/src/mac/cmac/cmac.h b/src/mac/cmac/cmac.h
index 98634bdb7..3e75d3951 100644
--- a/src/mac/cmac/cmac.h
+++ b/src/mac/cmac/cmac.h
@@ -35,7 +35,7 @@ class BOTAN_DLL CMAC : public MessageAuthenticationCode
* @param in the input
* @param polynomial the byte value of the polynomial
*/
- static SecureVector<byte> poly_double(const MemoryRegion<byte>& in,
+ static secure_vector<byte> poly_double(const secure_vector<byte>& in,
byte polynomial);
/**
@@ -49,7 +49,7 @@ class BOTAN_DLL CMAC : public MessageAuthenticationCode
void key_schedule(const byte[], size_t);
BlockCipher* e;
- SecureVector<byte> buffer, state, B, P;
+ secure_vector<byte> buffer, state, B, P;
size_t position;
byte polynomial;
};