diff options
author | lloyd <[email protected]> | 2007-07-21 19:35:10 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2007-07-21 19:35:10 +0000 |
commit | ad3c9c5a74be828440385f31c4b99affc3f33654 (patch) | |
tree | 77a0d026a9d79469fb0f3c26a430d165061ca9ad /src/kdf.cpp | |
parent | 5ea451fc8db248c76fe68db87b9c76ffad019655 (diff) |
Use std::string::data() instead of std::string::c_str() in cases where we
just want access to the underlying data representation but don't care if
the return value is NULL terminated or not.
Diffstat (limited to 'src/kdf.cpp')
-rw-r--r-- | src/kdf.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/kdf.cpp b/src/kdf.cpp index dad00204d..5dd53b957 100644 --- a/src/kdf.cpp +++ b/src/kdf.cpp @@ -19,7 +19,7 @@ SecureVector<byte> KDF::derive_key(u32bit key_len, const std::string& salt) const { return derive_key(key_len, secret, secret.size(), - (const byte*)salt.c_str(), salt.length()); + (const byte*)salt.data(), salt.length()); } /************************************************* @@ -52,7 +52,7 @@ SecureVector<byte> KDF::derive_key(u32bit key_len, const std::string& salt) const { return derive_key(key_len, secret, secret_len, - (const byte*)salt.c_str(), salt.length()); + (const byte*)salt.data(), salt.length()); } /************************************************* |