aboutsummaryrefslogtreecommitdiffstats
path: root/src/hash
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/hash
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/hash')
-rw-r--r--src/hash/gost_3411/gost_3411.cpp2
-rw-r--r--src/hash/md2/md2.cpp2
-rw-r--r--src/hash/skein/skein_512.cpp2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/hash/gost_3411/gost_3411.cpp b/src/hash/gost_3411/gost_3411.cpp
index 6996e45e6..6e56c2b97 100644
--- a/src/hash/gost_3411/gost_3411.cpp
+++ b/src/hash/gost_3411/gost_3411.cpp
@@ -210,7 +210,7 @@ void GOST_34_11::compress_n(const byte input[], size_t blocks)
S2[30] = S[ 2] ^ S[ 4] ^ S[ 8] ^ S[14] ^ S[16] ^ S[18] ^ S[22] ^ S[24] ^ S[28] ^ S[30];
S2[31] = S[ 3] ^ S[ 5] ^ S[ 9] ^ S[15] ^ S[17] ^ S[19] ^ S[23] ^ S[25] ^ S[29] ^ S[31];
- hash.copy(S2, 32);
+ copy_mem(&hash[0], &S2[0], 32);
}
}
diff --git a/src/hash/md2/md2.cpp b/src/hash/md2/md2.cpp
index f44053a1c..8f6a90208 100644
--- a/src/hash/md2/md2.cpp
+++ b/src/hash/md2/md2.cpp
@@ -79,7 +79,7 @@ void MD2::add_data(const byte input[], size_t length)
input += hash_block_size();
length -= hash_block_size();
}
- buffer.copy(input, length);
+ copy_mem(&buffer[0], input, length);
position = 0;
}
position += length;
diff --git a/src/hash/skein/skein_512.cpp b/src/hash/skein/skein_512.cpp
index f6541fba7..2458bf5f0 100644
--- a/src/hash/skein/skein_512.cpp
+++ b/src/hash/skein/skein_512.cpp
@@ -251,7 +251,7 @@ void Skein_512::final_result(byte out[])
{
const size_t to_proc = std::min<size_t>(out_bytes, 64);
- H_out.copy(&H[0], 8);
+ copy_mem(&H_out[0], &H[0], 8);
reset_tweak(T, SKEIN_OUTPUT, true);
ubi_512(H_out, T, counter, sizeof(counter));