diff options
Diffstat (limited to 'src/mac')
-rw-r--r-- | src/mac/cmac/cmac.cpp | 2 | ||||
-rw-r--r-- | src/mac/ssl3mac/ssl3_mac.cpp | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/mac/cmac/cmac.cpp b/src/mac/cmac/cmac.cpp index adc08852c..7cd53f578 100644 --- a/src/mac/cmac/cmac.cpp +++ b/src/mac/cmac/cmac.cpp @@ -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; diff --git a/src/mac/ssl3mac/ssl3_mac.cpp b/src/mac/ssl3mac/ssl3_mac.cpp index a07622eb3..8799c96a5 100644 --- a/src/mac/ssl3mac/ssl3_mac.cpp +++ b/src/mac/ssl3mac/ssl3_mac.cpp @@ -38,8 +38,9 @@ void SSL3_MAC::key_schedule(const byte key[], size_t length) std::fill(i_key.begin(), i_key.end(), 0x36); std::fill(o_key.begin(), o_key.end(), 0x5C); - i_key.copy(key, length); - o_key.copy(key, length); + copy_mem(&i_key[0], key, length); + copy_mem(&o_key[0], key, length); + hash->update(i_key); } |