aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/asn1/der_enc.cpp
diff options
context:
space:
mode:
authorSimon Warta <[email protected]>2015-06-26 11:32:10 +0200
committerSimon Warta <[email protected]>2015-06-27 11:18:13 +0200
commitd007082daa03ddebd124c38393f42793a1b50811 (patch)
tree04788426bbc4072024ae2d878c1c64830e9bc572 /src/lib/asn1/der_enc.cpp
parent105fb962ae525428c2385098abdf20bbf4382353 (diff)
lib/asn1: Convert &vec[0] to vec.data()
Diffstat (limited to 'src/lib/asn1/der_enc.cpp')
-rw-r--r--src/lib/asn1/der_enc.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/asn1/der_enc.cpp b/src/lib/asn1/der_enc.cpp
index ab84c258d..f886e8ed3 100644
--- a/src/lib/asn1/der_enc.cpp
+++ b/src/lib/asn1/der_enc.cpp
@@ -179,12 +179,12 @@ DER_Encoder& DER_Encoder::end_explicit()
*/
DER_Encoder& DER_Encoder::raw_bytes(const secure_vector<byte>& val)
{
- return raw_bytes(&val[0], val.size());
+ return raw_bytes(val.data(), val.size());
}
DER_Encoder& DER_Encoder::raw_bytes(const std::vector<byte>& val)
{
- return raw_bytes(&val[0], val.size());
+ return raw_bytes(val.data(), val.size());
}
/*
@@ -238,7 +238,7 @@ DER_Encoder& DER_Encoder::encode(const BigInt& n)
DER_Encoder& DER_Encoder::encode(const secure_vector<byte>& bytes,
ASN1_Tag real_type)
{
- return encode(&bytes[0], bytes.size(),
+ return encode(bytes.data(), bytes.size(),
real_type, real_type, UNIVERSAL);
}
@@ -248,7 +248,7 @@ DER_Encoder& DER_Encoder::encode(const secure_vector<byte>& bytes,
DER_Encoder& DER_Encoder::encode(const std::vector<byte>& bytes,
ASN1_Tag real_type)
{
- return encode(&bytes[0], bytes.size(),
+ return encode(bytes.data(), bytes.size(),
real_type, real_type, UNIVERSAL);
}
@@ -311,7 +311,7 @@ DER_Encoder& DER_Encoder::encode(const secure_vector<byte>& bytes,
ASN1_Tag real_type,
ASN1_Tag type_tag, ASN1_Tag class_tag)
{
- return encode(&bytes[0], bytes.size(),
+ return encode(bytes.data(), bytes.size(),
real_type, type_tag, class_tag);
}
@@ -322,7 +322,7 @@ DER_Encoder& DER_Encoder::encode(const std::vector<byte>& bytes,
ASN1_Tag real_type,
ASN1_Tag type_tag, ASN1_Tag class_tag)
{
- return encode(&bytes[0], bytes.size(),
+ return encode(bytes.data(), bytes.size(),
real_type, type_tag, class_tag);
}