diff options
author | lloyd <[email protected]> | 2010-09-13 12:28:27 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-09-13 12:28:27 +0000 |
commit | 27d79c87365105d6128afe9eaf8a82383976ed44 (patch) | |
tree | 9a4f0e1d5ae7ecd5c058c0293d9b546191990cdb /src/pk_pad | |
parent | 9acfc3a50b31044e48d8dee5fc8030ad7f4518d4 (diff) |
Anywhere where we use MemoryRegion::begin to get access to the raw pointer
representation (rather than in an interator context), instead use &buf[0],
which works for both MemoryRegion and std::vector
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; |