aboutsummaryrefslogtreecommitdiffstats
path: root/src/pk_pad/eme1
diff options
context:
space:
mode:
authorlloyd <[email protected]>2012-05-18 13:58:23 +0000
committerlloyd <[email protected]>2012-05-18 13:58:23 +0000
commit2c3dc93d6466a9215d585613fb55f5222ce70d10 (patch)
tree9d44c738fdbb79103bed2d34c8fb171f8eaa00a2 /src/pk_pad/eme1
parentc2d0d2982e96ab7ce15e90b8d73c9774e2650d86 (diff)
First step towards replacing the existing containers with std::vector
with a custom allocator; remove the 3 argument version of MemoryRegion::copy, replacing with freestanding buffer_insert function.
Diffstat (limited to 'src/pk_pad/eme1')
-rw-r--r--src/pk_pad/eme1/eme1.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pk_pad/eme1/eme1.cpp b/src/pk_pad/eme1/eme1.cpp
index 1cc0c332d..69251605f 100644
--- a/src/pk_pad/eme1/eme1.cpp
+++ b/src/pk_pad/eme1/eme1.cpp
@@ -28,9 +28,9 @@ SecureVector<byte> EME1::pad(const byte in[], size_t in_length,
rng.randomize(&out[0], Phash.size());
- out.copy(Phash.size(), &Phash[0], Phash.size());
+ buffer_insert(out, Phash.size(), &Phash[0], Phash.size());
out[out.size() - in_length - 1] = 0x01;
- out.copy(out.size() - in_length, in, in_length);
+ buffer_insert(out, out.size() - in_length, in, in_length);
mgf->mask(&out[0], Phash.size(),
&out[Phash.size()], out.size() - Phash.size());
@@ -66,7 +66,7 @@ SecureVector<byte> EME1::unpad(const byte in[], size_t in_length,
in_length = 0;
SecureVector<byte> input(key_length);
- input.copy(key_length - in_length, in, in_length);
+ buffer_insert(input, key_length - in_length, in, in_length);
mgf->mask(&input[Phash.size()], input.size() - Phash.size(),
&input[0], Phash.size());