aboutsummaryrefslogtreecommitdiffstats
path: root/src/mac/cmac/cmac.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mac/cmac/cmac.cpp')
-rw-r--r--src/mac/cmac/cmac.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mac/cmac/cmac.cpp b/src/mac/cmac/cmac.cpp
index baf22f4e8..7cd53f578 100644
--- a/src/mac/cmac/cmac.cpp
+++ b/src/mac/cmac/cmac.cpp
@@ -38,7 +38,7 @@ SecureVector<byte> CMAC::poly_double(const MemoryRegion<byte>& in,
*/
void CMAC::add_data(const byte input[], size_t length)
{
- buffer.copy(position, input, length);
+ buffer_insert(buffer, position, input, length);
if(position + length > output_length())
{
xor_buf(state, buffer, output_length());
@@ -52,7 +52,7 @@ void CMAC::add_data(const byte input[], size_t length)
input += output_length();
length -= output_length();
}
- buffer.copy(input, length);
+ copy_mem(&buffer[0], input, length);
position = 0;
}
position += length;