From ad3c9c5a74be828440385f31c4b99affc3f33654 Mon Sep 17 00:00:00 2001 From: lloyd Date: Sat, 21 Jul 2007 19:35:10 +0000 Subject: 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. --- src/pkcs5.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/pkcs5.cpp') 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 key(key_len); byte* T = key.begin(); -- cgit v1.2.3