diff options
author | Simon Warta <[email protected]> | 2015-06-23 20:07:15 +0200 |
---|---|---|
committer | Simon Warta <[email protected]> | 2015-06-23 20:07:15 +0200 |
commit | fd1c77c5cf8d86c6ba6d2f5c8cf898502c463eba (patch) | |
tree | 6ac5df8e74d2ad203f03da28aba46e2a4bfdbea5 /src/lib/pubkey/pk_ops.cpp | |
parent | 2a83523815461a4aa461ce5cc3b1288727440705 (diff) |
lib/pubkey: Convert &vec[0] to vec.data()
Diffstat (limited to 'src/lib/pubkey/pk_ops.cpp')
-rw-r--r-- | src/lib/pubkey/pk_ops.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/pubkey/pk_ops.cpp b/src/lib/pubkey/pk_ops.cpp index f78861b9f..9f264af12 100644 --- a/src/lib/pubkey/pk_ops.cpp +++ b/src/lib/pubkey/pk_ops.cpp @@ -37,7 +37,7 @@ secure_vector<byte> PK_Ops::Encryption_with_EME::encrypt(const byte msg[], size_ if(8*(encoded.size() - 1) + high_bit(encoded[0]) > max_raw) throw std::runtime_error("Input is too large to encrypt with this key"); - return raw_encrypt(&encoded[0], encoded.size(), rng); + return raw_encrypt(encoded.data(), encoded.size(), rng); } PK_Ops::Decryption_with_EME::Decryption_with_EME(const std::string& eme) @@ -95,7 +95,7 @@ secure_vector<byte> PK_Ops::Signature_with_EMSA::sign(RandomNumberGenerator& rng { const secure_vector<byte> msg = m_emsa->raw_data(); const auto padded = m_emsa->encoding_of(msg, this->max_input_bits(), rng); - return raw_sign(&padded[0], padded.size(), rng); + return raw_sign(padded.data(), padded.size(), rng); } PK_Ops::Verification_with_EMSA::Verification_with_EMSA(const std::string& emsa) @@ -125,7 +125,7 @@ bool PK_Ops::Verification_with_EMSA::is_valid_signature(const byte sig[], size_t { Null_RNG rng; secure_vector<byte> encoded = m_emsa->encoding_of(msg, max_input_bits(), rng); - return verify(&encoded[0], encoded.size(), sig, sig_len); + return verify(encoded.data(), encoded.size(), sig, sig_len); } } |