aboutsummaryrefslogtreecommitdiffstats
path: root/src/pkcs5.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2007-07-21 19:35:10 +0000
committerlloyd <[email protected]>2007-07-21 19:35:10 +0000
commitad3c9c5a74be828440385f31c4b99affc3f33654 (patch)
tree77a0d026a9d79469fb0f3c26a430d165061ca9ad /src/pkcs5.cpp
parent5ea451fc8db248c76fe68db87b9c76ffad019655 (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/pkcs5.cpp')
-rw-r--r--src/pkcs5.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pkcs5.cpp b/src/pkcs5.cpp
index 3f6e22ac4..c0dc72b35 100644
--- a/src/pkcs5.cpp
+++ b/src/pkcs5.cpp
@@ -72,7 +72,7 @@ OctetString PKCS5_PBKDF2::derive(u32bit key_len,
throw Invalid_Argument("PKCS#5 PBKDF2: Empty passphrase is invalid");
HMAC hmac(hash_name);
- hmac.set_key((const byte*)passphrase.c_str(), passphrase.length());
+ hmac.set_key((const byte*)passphrase.data(), passphrase.length());
SecureVector<byte> key(key_len);
byte* T = key.begin();