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

Unified Diff: components/webcrypto/algorithms/aes_cbc.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
Index: components/webcrypto/algorithms/aes_cbc.cc
diff --git a/components/webcrypto/algorithms/aes_cbc.cc b/components/webcrypto/algorithms/aes_cbc.cc
index 0d9c88ef6f97fe56d8967d82933d73f73c195e38..2cda785299a1025aba6ab66c7fb9721b18cd3537 100644
--- a/components/webcrypto/algorithms/aes_cbc.cc
+++ b/components/webcrypto/algorithms/aes_cbc.cc
@@ -7,7 +7,6 @@
#include "base/logging.h"
#include "base/numerics/safe_math.h"
-#include "base/stl_util.h"
#include "components/webcrypto/algorithms/aes.h"
#include "components/webcrypto/algorithms/util.h"
#include "components/webcrypto/blink_key_handle.h"
@@ -77,15 +76,13 @@ Status AesCbcEncryptDecrypt(EncryptOrDecrypt cipher_operation,
buffer->resize(output_max_len.ValueOrDie());
- unsigned char* const buffer_data = vector_as_array(buffer);
-
int output_len = 0;
- if (!EVP_CipherUpdate(context.get(), buffer_data, &output_len, data.bytes(),
- data.byte_length())) {
+ if (!EVP_CipherUpdate(context.get(), buffer->data(), &output_len,
+ data.bytes(), data.byte_length())) {
return Status::OperationError();
}
int final_output_chunk_len = 0;
- if (!EVP_CipherFinal_ex(context.get(), buffer_data + output_len,
+ if (!EVP_CipherFinal_ex(context.get(), buffer->data() + output_len,
&final_output_chunk_len)) {
return Status::OperationError();
}
« no previous file with comments | « components/ownership/owner_key_util_impl_unittest.cc ('k') | components/webcrypto/algorithms/aes_cbc_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698