diff options
author | Simon Warta <[email protected]> | 2015-06-25 11:19:24 +0200 |
---|---|---|
committer | Simon Warta <[email protected]> | 2015-06-25 11:19:24 +0200 |
commit | 3f91cbe7e5143dedb388fa2ce324194a1656f82f (patch) | |
tree | 2275ca2bb523cb57cd11f794d94f24fc0b643df4 /src/lib/kdf/kdf.h | |
parent | 026329021ca6693be545752238c517d477166a63 (diff) |
lib/kdf: Convert &vec[0] to vec.data()
Diffstat (limited to 'src/lib/kdf/kdf.h')
-rw-r--r-- | src/lib/kdf/kdf.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/kdf/kdf.h b/src/lib/kdf/kdf.h index dc23a82bd..d69c1ece5 100644 --- a/src/lib/kdf/kdf.h +++ b/src/lib/kdf/kdf.h @@ -45,7 +45,7 @@ class BOTAN_DLL KDF size_t salt_len) const { secure_vector<byte> key(key_len); - key.resize(kdf(&key[0], key.size(), secret, secret_len, salt, salt_len)); + key.resize(kdf(key.data(), key.size(), secret, secret_len, salt, salt_len)); return key; } @@ -59,7 +59,7 @@ class BOTAN_DLL KDF const secure_vector<byte>& secret, const std::string& salt = "") const { - return derive_key(key_len, &secret[0], secret.size(), + return derive_key(key_len, secret.data(), secret.size(), reinterpret_cast<const byte*>(salt.data()), salt.length()); } @@ -76,8 +76,8 @@ class BOTAN_DLL KDF const std::vector<byte, Alloc2>& salt) const { return derive_key(key_len, - &secret[0], secret.size(), - &salt[0], salt.size()); + secret.data(), secret.size(), + salt.data(), salt.size()); } /** @@ -93,7 +93,7 @@ class BOTAN_DLL KDF size_t salt_len) const { return derive_key(key_len, - &secret[0], secret.size(), + secret.data(), secret.size(), salt, salt_len); } |