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

Unified Diff: content/child/webcrypto/openssl/aes_gcm_openssl.cc

Issue 410743002: [refactor] Replace custom utility function with base's "vector_as_array()" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase onto master Created 6 years, 5 months 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 | « content/child/webcrypto/openssl/aes_cbc_openssl.cc ('k') | content/child/webcrypto/openssl/hmac_openssl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/webcrypto/openssl/aes_gcm_openssl.cc
diff --git a/content/child/webcrypto/openssl/aes_gcm_openssl.cc b/content/child/webcrypto/openssl/aes_gcm_openssl.cc
index bcb13642ba993f2b296bb572fd1908a0f3609b35..9d0daad657abe924fadfc50a5cd9e9012fb7a724 100644
--- a/content/child/webcrypto/openssl/aes_gcm_openssl.cc
+++ b/content/child/webcrypto/openssl/aes_gcm_openssl.cc
@@ -6,6 +6,7 @@
#include <openssl/evp.h>
#include "base/logging.h"
+#include "base/stl_util.h"
#include "content/child/webcrypto/crypto_data.h"
#include "content/child/webcrypto/openssl/aes_key_openssl.h"
#include "content/child/webcrypto/openssl/key_openssl.h"
@@ -62,7 +63,7 @@ Status AesGcmEncryptDecrypt(EncryptOrDecrypt mode,
if (!EVP_AEAD_CTX_init(&ctx,
aead_alg,
- Uint8VectorStart(raw_key),
+ vector_as_array(&raw_key),
raw_key.size(),
tag_length_bytes,
NULL)) {
@@ -82,7 +83,7 @@ Status AesGcmEncryptDecrypt(EncryptOrDecrypt mode,
buffer->resize(data.byte_length() - tag_length_bytes);
ok = EVP_AEAD_CTX_open(&ctx,
- Uint8VectorStart(buffer),
+ vector_as_array(buffer),
&len,
buffer->size(),
iv.bytes(),
@@ -97,7 +98,7 @@ Status AesGcmEncryptDecrypt(EncryptOrDecrypt mode,
buffer->resize(data.byte_length() + tag_length_bytes);
ok = EVP_AEAD_CTX_seal(&ctx,
- Uint8VectorStart(buffer),
+ vector_as_array(buffer),
&len,
buffer->size(),
iv.bytes(),
« no previous file with comments | « content/child/webcrypto/openssl/aes_cbc_openssl.cc ('k') | content/child/webcrypto/openssl/hmac_openssl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698