Chromium Code Reviews| Index: crypto/symmetric_key_openssl.cc |
| diff --git a/crypto/symmetric_key_openssl.cc b/crypto/symmetric_key_openssl.cc |
| index 2c5358f6274ac3a30128768fd35aa812ebab6e6f..16ce2e8061ebff4fcc303f3435cfcc22858f3bf5 100644 |
| --- a/crypto/symmetric_key_openssl.cc |
| +++ b/crypto/symmetric_key_openssl.cc |
| @@ -2,19 +2,18 @@ |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| -#include "crypto/symmetric_key.h" |
| - |
| #include <openssl/evp.h> |
| #include <openssl/rand.h> |
| #include <stddef.h> |
| #include <stdint.h> |
| #include <algorithm> |
| +#include <memory> |
| #include "base/logging.h" |
| -#include "base/memory/scoped_ptr.h" |
| #include "base/strings/string_util.h" |
| #include "crypto/openssl_util.h" |
| +#include "crypto/symmetric_key.h" |
|
Ryan Sleevi
2016/04/08 21:15:26
This shouldn't have moved
Nico
2016/04/08 21:20:23
Oh, sorry. I tried to catch all these (the script
|
| namespace crypto { |
| @@ -40,7 +39,7 @@ SymmetricKey* SymmetricKey::GenerateRandomKey(Algorithm algorithm, |
| return NULL; |
| OpenSSLErrStackTracer err_tracer(FROM_HERE); |
| - scoped_ptr<SymmetricKey> key(new SymmetricKey); |
| + std::unique_ptr<SymmetricKey> key(new SymmetricKey); |
| uint8_t* key_data = reinterpret_cast<uint8_t*>( |
| base::WriteInto(&key->key_, key_size_in_bytes + 1)); |
| @@ -71,7 +70,7 @@ SymmetricKey* SymmetricKey::DeriveKeyFromPassword(Algorithm algorithm, |
| return NULL; |
| OpenSSLErrStackTracer err_tracer(FROM_HERE); |
| - scoped_ptr<SymmetricKey> key(new SymmetricKey); |
| + std::unique_ptr<SymmetricKey> key(new SymmetricKey); |
| uint8_t* key_data = reinterpret_cast<uint8_t*>( |
| base::WriteInto(&key->key_, key_size_in_bytes + 1)); |
| int rv = PKCS5_PBKDF2_HMAC_SHA1( |
| @@ -92,7 +91,7 @@ SymmetricKey* SymmetricKey::Import(Algorithm algorithm, |
| return NULL; |
| } |
| - scoped_ptr<SymmetricKey> key(new SymmetricKey); |
| + std::unique_ptr<SymmetricKey> key(new SymmetricKey); |
| key->key_ = raw_key; |
| return key.release(); |
| } |