diff options
author | Brett Wilson <brettw@chromium.org> | 2015-07-07 16:38:09 -0700 |
---|---|---|
committer | Brett Wilson <brettw@chromium.org> | 2015-07-07 23:39:16 +0000 |
commit | e3c4d1a1228e00b190ad743a83f88a2266f45238 (patch) | |
tree | 3923b42b43c9b7a8a689d0468688b30bf9ea8f83 /crypto/symmetric_key_openssl.cc | |
parent | 1c33a26e56880fbf058fd796aa004e097e07b691 (diff) | |
download | chromium_src-e3c4d1a1228e00b190ad743a83f88a2266f45238.zip chromium_src-e3c4d1a1228e00b190ad743a83f88a2266f45238.tar.gz chromium_src-e3c4d1a1228e00b190ad743a83f88a2266f45238.tar.bz2 |
Move WriteInto to base namespace.
Update all callers.
De-inlines the template. For some reason touching the namespaces started givin errors about DCHECK not being defined. Indeed, this header does not include logging.h. Rather than include logging in this very common header, it seems preferable to move the implementation to the .cc file.
This removes support for the wstring variant and updates the callers that used it.
R=ben@chromium.org, ben
TBR=jschuh (sandbox_win.cc)
NOPRESUBMIT=true
(this patch touches code using legacy wstrings)
Review URL: https://codereview.chromium.org/1223983002.
Cr-Commit-Position: refs/heads/master@{#337703}
Diffstat (limited to 'crypto/symmetric_key_openssl.cc')
-rw-r--r-- | crypto/symmetric_key_openssl.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crypto/symmetric_key_openssl.cc b/crypto/symmetric_key_openssl.cc index e268a1d0..912c9b4 100644 --- a/crypto/symmetric_key_openssl.cc +++ b/crypto/symmetric_key_openssl.cc @@ -39,8 +39,8 @@ SymmetricKey* SymmetricKey::GenerateRandomKey(Algorithm algorithm, OpenSSLErrStackTracer err_tracer(FROM_HERE); scoped_ptr<SymmetricKey> key(new SymmetricKey); - uint8* key_data = - reinterpret_cast<uint8*>(WriteInto(&key->key_, key_size_in_bytes + 1)); + uint8* key_data = reinterpret_cast<uint8*>( + base::WriteInto(&key->key_, key_size_in_bytes + 1)); int rv = RAND_bytes(key_data, static_cast<int>(key_size_in_bytes)); return rv == 1 ? key.release() : NULL; @@ -70,8 +70,8 @@ SymmetricKey* SymmetricKey::DeriveKeyFromPassword(Algorithm algorithm, OpenSSLErrStackTracer err_tracer(FROM_HERE); scoped_ptr<SymmetricKey> key(new SymmetricKey); - uint8* key_data = - reinterpret_cast<uint8*>(WriteInto(&key->key_, key_size_in_bytes + 1)); + uint8* key_data = reinterpret_cast<uint8*>( + base::WriteInto(&key->key_, key_size_in_bytes + 1)); int rv = PKCS5_PBKDF2_HMAC_SHA1(password.data(), password.length(), reinterpret_cast<const uint8*>(salt.data()), salt.length(), iterations, |