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

Unified Diff: components/webcrypto/algorithms/hkdf.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/ecdsa.cc ('k') | components/webcrypto/algorithms/hmac.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/webcrypto/algorithms/hkdf.cc
diff --git a/components/webcrypto/algorithms/hkdf.cc b/components/webcrypto/algorithms/hkdf.cc
index 0ccb857919cb8741bc83b7e4040fb70da46ae7be..2f5dc072fd5e28852e25eb4cbae04a6f3a6b5d4f 100644
--- a/components/webcrypto/algorithms/hkdf.cc
+++ b/components/webcrypto/algorithms/hkdf.cc
@@ -6,7 +6,6 @@
#include <openssl/hkdf.h>
#include "base/logging.h"
-#include "base/stl_util.h"
#include "components/webcrypto/algorithm_implementation.h"
#include "components/webcrypto/algorithms/secret_key_util.h"
#include "components/webcrypto/algorithms/util.h"
@@ -69,10 +68,10 @@ class HkdfImplementation : public AlgorithmImplementation {
// Algorithm dispatch checks that the algorithm in |base_key| matches
// |algorithm|.
const std::vector<uint8_t>& raw_key = GetSymmetricKeyData(base_key);
- if (!HKDF(vector_as_array(derived_bytes), derived_bytes_len,
- digest_algorithm, vector_as_array(&raw_key), raw_key.size(),
- params->salt().data(), params->salt().size(),
- params->info().data(), params->info().size())) {
+ if (!HKDF(derived_bytes->data(), derived_bytes_len, digest_algorithm,
+ raw_key.data(), raw_key.size(), params->salt().data(),
+ params->salt().size(), params->info().data(),
+ params->info().size())) {
uint32_t error = ERR_get_error();
if (ERR_GET_LIB(error) == ERR_LIB_HKDF &&
ERR_GET_REASON(error) == HKDF_R_OUTPUT_TOO_LARGE) {
« no previous file with comments | « components/webcrypto/algorithms/ecdsa.cc ('k') | components/webcrypto/algorithms/hmac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698