aboutsummaryrefslogtreecommitdiffstats
path: root/src/pk_pad/emsa4
diff options
context:
space:
mode:
Diffstat (limited to 'src/pk_pad/emsa4')
-rw-r--r--src/pk_pad/emsa4/emsa4.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pk_pad/emsa4/emsa4.cpp b/src/pk_pad/emsa4/emsa4.cpp
index 194d934c1..d05e4a5b5 100644
--- a/src/pk_pad/emsa4/emsa4.cpp
+++ b/src/pk_pad/emsa4/emsa4.cpp
@@ -54,10 +54,10 @@ SecureVector<byte> EMSA4::encoding_of(const MemoryRegion<byte>& msg,
SecureVector<byte> EM(output_length);
EM[output_length - HASH_SIZE - SALT_SIZE - 2] = 0x01;
- EM.copy(output_length - 1 - HASH_SIZE - SALT_SIZE, salt, SALT_SIZE);
+ buffer_insert(EM, output_length - 1 - HASH_SIZE - SALT_SIZE, salt);
mgf->mask(H, HASH_SIZE, EM, output_length - HASH_SIZE - 1);
EM[0] &= 0xFF >> (8 * ((output_bits + 7) / 8) - output_bits);
- EM.copy(output_length - 1 - HASH_SIZE, H, HASH_SIZE);
+ buffer_insert(EM, output_length - 1 - HASH_SIZE, H);
EM[output_length-1] = 0xBC;
return EM;
@@ -88,7 +88,7 @@ bool EMSA4::verify(const MemoryRegion<byte>& const_coded,
if(coded.size() < KEY_BYTES)
{
SecureVector<byte> temp(KEY_BYTES);
- temp.copy(KEY_BYTES - coded.size(), coded, coded.size());
+ buffer_insert(temp, KEY_BYTES - coded.size(), coded);
coded = temp;
}