diff options
Diffstat (limited to 'src/pk_pad')
-rw-r--r-- | src/pk_pad/emsa4/emsa4.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pk_pad/emsa4/emsa4.cpp b/src/pk_pad/emsa4/emsa4.cpp index df4005aad..41b1e6971 100644 --- a/src/pk_pad/emsa4/emsa4.cpp +++ b/src/pk_pad/emsa4/emsa4.cpp @@ -94,8 +94,8 @@ bool EMSA4::verify(const MemoryRegion<byte>& const_coded, if(TOP_BITS > 8 - high_bit(coded[0])) return false; - SecureVector<byte> DB(coded.begin(), coded.size() - HASH_SIZE - 1); - SecureVector<byte> H(coded + coded.size() - HASH_SIZE - 1, HASH_SIZE); + SecureVector<byte> DB(&coded[0], coded.size() - HASH_SIZE - 1); + SecureVector<byte> H(&coded[coded.size() - HASH_SIZE - 1], HASH_SIZE); mgf->mask(H, H.size(), DB, coded.size() - H.size() - 1); DB[0] &= 0xFF >> TOP_BITS; |