Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(202)

Unified Diff: components/webcrypto/algorithms/secret_key_util.cc

Issue 1461703009: Switch //components from vector_as_array to vector::data. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: eroman comment Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/webcrypto/algorithms/rsa_ssa_unittest.cc ('k') | components/webcrypto/algorithms/sha.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/webcrypto/algorithms/secret_key_util.cc
diff --git a/components/webcrypto/algorithms/secret_key_util.cc b/components/webcrypto/algorithms/secret_key_util.cc
index dcdecfa19e6d64fc19aedfefda82f07a9f4d5665..3110e26dc21ef94f6b0f9b9a2af25264ccaabc29 100644
--- a/components/webcrypto/algorithms/secret_key_util.cc
+++ b/components/webcrypto/algorithms/secret_key_util.cc
@@ -6,7 +6,6 @@
#include <openssl/rand.h>
-#include "base/stl_util.h"
#include "components/webcrypto/algorithms/util.h"
#include "components/webcrypto/blink_key_handle.h"
#include "components/webcrypto/crypto_data.h"
@@ -25,10 +24,10 @@ Status GenerateWebCryptoSecretKey(const blink::WebCryptoKeyAlgorithm& algorithm,
crypto::OpenSSLErrStackTracer err_tracer(FROM_HERE);
unsigned int keylen_bytes = NumBitsToBytes(keylen_bits);
- std::vector<unsigned char> random_bytes(keylen_bytes, 0);
+ std::vector<uint8_t> random_bytes(keylen_bytes, 0);
if (keylen_bytes > 0) {
- if (!RAND_bytes(vector_as_array(&random_bytes), keylen_bytes))
+ if (!RAND_bytes(random_bytes.data(), keylen_bytes))
return Status::OperationError();
TruncateToBitLength(keylen_bits, &random_bytes);
}
« no previous file with comments | « components/webcrypto/algorithms/rsa_ssa_unittest.cc ('k') | components/webcrypto/algorithms/sha.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698