diff options
author | Daniel Seither <[email protected]> | 2015-06-20 18:39:40 +0200 |
---|---|---|
committer | Daniel Seither <[email protected]> | 2015-06-20 19:05:07 +0200 |
commit | bd5427214f0acba796f43bd6289f860fbed73519 (patch) | |
tree | 38f783fa532670fe7de910108f06e480f4bc3c8e /src/lib/pk_pad/emsa_pkcs1 | |
parent | 9dc9dd03af7f0f175c05ab9886f5e71d3d3a760d (diff) |
lib/pk_pad: Convert &vec[0] to vec.data()
Diffstat (limited to 'src/lib/pk_pad/emsa_pkcs1')
-rw-r--r-- | src/lib/pk_pad/emsa_pkcs1/emsa_pkcs1.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/pk_pad/emsa_pkcs1/emsa_pkcs1.cpp b/src/lib/pk_pad/emsa_pkcs1/emsa_pkcs1.cpp index f73c8b7d9..2c2fbd2e8 100644 --- a/src/lib/pk_pad/emsa_pkcs1/emsa_pkcs1.cpp +++ b/src/lib/pk_pad/emsa_pkcs1/emsa_pkcs1.cpp @@ -46,7 +46,7 @@ secure_vector<byte> emsa3_encoding(const secure_vector<byte>& msg, set_mem(&T[1], P_LENGTH, 0xFF); T[P_LENGTH+1] = 0x00; buffer_insert(T, P_LENGTH+2, hash_id, hash_id_length); - buffer_insert(T, output_length-msg.size(), &msg[0], msg.size()); + buffer_insert(T, output_length-msg.size(), msg.data(), msg.size()); return T; } @@ -71,7 +71,7 @@ EMSA_PKCS1v15::encoding_of(const secure_vector<byte>& msg, throw Encoding_Error("EMSA_PKCS1v15::encoding_of: Bad input length"); return emsa3_encoding(msg, output_bits, - &m_hash_id[0], m_hash_id.size()); + m_hash_id.data(), m_hash_id.size()); } bool EMSA_PKCS1v15::verify(const secure_vector<byte>& coded, @@ -84,7 +84,7 @@ bool EMSA_PKCS1v15::verify(const secure_vector<byte>& coded, try { return (coded == emsa3_encoding(raw, key_bits, - &m_hash_id[0], m_hash_id.size())); + m_hash_id.data(), m_hash_id.size())); } catch(...) { |