From 27d79c87365105d6128afe9eaf8a82383976ed44 Mon Sep 17 00:00:00 2001 From: lloyd Date: Mon, 13 Sep 2010 12:28:27 +0000 Subject: 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 --- src/pk_pad/emsa4/emsa4.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/pk_pad') 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& const_coded, if(TOP_BITS > 8 - high_bit(coded[0])) return false; - SecureVector DB(coded.begin(), coded.size() - HASH_SIZE - 1); - SecureVector H(coded + coded.size() - HASH_SIZE - 1, HASH_SIZE); + SecureVector DB(&coded[0], coded.size() - HASH_SIZE - 1); + SecureVector 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; -- cgit v1.2.3