From d8fcd41ea72d7e00924bb78baa698565de825844 Mon Sep 17 00:00:00 2001 From: lloyd Date: Fri, 3 Sep 2010 15:43:44 +0000 Subject: Use std::to_string --- src/constructs/passhash/passhash9.cpp | 3 ++- src/pbkdf/pbkdf2/pbkdf2.cpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/constructs/passhash/passhash9.cpp b/src/constructs/passhash/passhash9.cpp index 6618f36fa..3099e061e 100644 --- a/src/constructs/passhash/passhash9.cpp +++ b/src/constructs/passhash/passhash9.cpp @@ -62,7 +62,8 @@ std::string generate_passhash9(const std::string& pass, MessageAuthenticationCode* prf = get_pbkdf_prf(alg_id); if(!prf) - throw Invalid_Argument("Passhash9: Algorithm id " + to_string(alg_id) + + throw Invalid_Argument("Passhash9: Algorithm id " + + std::to_string(alg_id) + " is not defined"); PKCS5_PBKDF2 kdf(prf); // takes ownership of pointer diff --git a/src/pbkdf/pbkdf2/pbkdf2.cpp b/src/pbkdf/pbkdf2/pbkdf2.cpp index 6f6a514f8..5409c2c56 100644 --- a/src/pbkdf/pbkdf2/pbkdf2.cpp +++ b/src/pbkdf/pbkdf2/pbkdf2.cpp @@ -30,7 +30,7 @@ OctetString PKCS5_PBKDF2::derive_key(u32bit key_len, catch(Invalid_Key_Length) { throw Exception(name() + " cannot accept passphrases of length " + - to_string(passphrase.length())); + std::to_string(passphrase.length())); } SecureVector key(key_len); -- cgit v1.2.3