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

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

Issue 670773003: Cleanup: rename usage_mask --> usages. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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_key_openssl.h ('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_key_openssl.cc
diff --git a/content/child/webcrypto/openssl/aes_key_openssl.cc b/content/child/webcrypto/openssl/aes_key_openssl.cc
index 738b87bc670f6cb903304a219ade8294c52fa978..14fa24e35c2d15d02555c47a695e0095d47a9fd9 100644
--- a/content/child/webcrypto/openssl/aes_key_openssl.cc
+++ b/content/child/webcrypto/openssl/aes_key_openssl.cc
@@ -32,9 +32,9 @@ AesAlgorithm::AesAlgorithm(const std::string& jwk_suffix)
Status AesAlgorithm::GenerateKey(const blink::WebCryptoAlgorithm& algorithm,
bool extractable,
- blink::WebCryptoKeyUsageMask usage_mask,
+ blink::WebCryptoKeyUsageMask usages,
GenerateKeyResult* result) const {
- Status status = CheckKeyCreationUsages(all_key_usages_, usage_mask);
+ Status status = CheckKeyCreationUsages(all_key_usages_, usages);
if (status.IsError())
return status;
@@ -46,18 +46,18 @@ Status AesAlgorithm::GenerateKey(const blink::WebCryptoAlgorithm& algorithm,
return GenerateSecretKeyOpenSsl(
blink::WebCryptoKeyAlgorithm::createAes(algorithm.id(), keylen_bits),
extractable,
- usage_mask,
+ usages,
keylen_bits / 8,
result);
}
Status AesAlgorithm::VerifyKeyUsagesBeforeImportKey(
blink::WebCryptoKeyFormat format,
- blink::WebCryptoKeyUsageMask usage_mask) const {
+ blink::WebCryptoKeyUsageMask usages) const {
switch (format) {
case blink::WebCryptoKeyFormatRaw:
case blink::WebCryptoKeyFormatJwk:
- return CheckKeyCreationUsages(all_key_usages_, usage_mask);
+ return CheckKeyCreationUsages(all_key_usages_, usages);
default:
return Status::ErrorUnsupportedImportKeyFormat();
}
@@ -66,7 +66,7 @@ Status AesAlgorithm::VerifyKeyUsagesBeforeImportKey(
Status AesAlgorithm::ImportKeyRaw(const CryptoData& key_data,
const blink::WebCryptoAlgorithm& algorithm,
bool extractable,
- blink::WebCryptoKeyUsageMask usage_mask,
+ blink::WebCryptoKeyUsageMask usages,
blink::WebCryptoKey* key) const {
const unsigned int keylen_bytes = key_data.byte_length();
Status status = VerifyAesKeyLengthForImport(keylen_bytes);
@@ -80,23 +80,23 @@ Status AesAlgorithm::ImportKeyRaw(const CryptoData& key_data,
key_data,
blink::WebCryptoKeyAlgorithm::createAes(algorithm.id(), keylen_bits),
extractable,
- usage_mask,
+ usages,
key);
}
Status AesAlgorithm::ImportKeyJwk(const CryptoData& key_data,
const blink::WebCryptoAlgorithm& algorithm,
bool extractable,
- blink::WebCryptoKeyUsageMask usage_mask,
+ blink::WebCryptoKeyUsageMask usages,
blink::WebCryptoKey* key) const {
std::vector<uint8_t> raw_data;
Status status = ReadAesSecretKeyJwk(
- key_data, jwk_suffix_, extractable, usage_mask, &raw_data);
+ key_data, jwk_suffix_, extractable, usages, &raw_data);
if (status.IsError())
return status;
return ImportKeyRaw(
- CryptoData(raw_data), algorithm, extractable, usage_mask, key);
+ CryptoData(raw_data), algorithm, extractable, usages, key);
}
Status AesAlgorithm::ExportKeyRaw(const blink::WebCryptoKey& key,
« no previous file with comments | « content/child/webcrypto/openssl/aes_key_openssl.h ('k') | content/child/webcrypto/openssl/hmac_openssl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698