aboutsummaryrefslogtreecommitdiffstats
path: root/src/mac
diff options
context:
space:
mode:
authorlloyd <[email protected]>2012-05-18 14:24:51 +0000
committerlloyd <[email protected]>2012-05-18 14:24:51 +0000
commitab5c922f0e2635dc0e45fc757b27be9f28986acb (patch)
treec21a18bbfb316196b1b13488ef05f184f12be9f0 /src/mac
parent2c3dc93d6466a9215d585613fb55f5222ce70d10 (diff)
Remove all uses of MemoryRegion::copy outside of internal uses in
secmem.h. Mostly replaced by assign or copy_mem.
Diffstat (limited to 'src/mac')
-rw-r--r--src/mac/cmac/cmac.cpp2
-rw-r--r--src/mac/ssl3mac/ssl3_mac.cpp5
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);
}