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

Side by Side Diff: content/child/webcrypto/nss/aes_key_nss.h

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 unified diff | Download patch
« no previous file with comments | « content/child/webcrypto/nss/aes_gcm_nss.cc ('k') | content/child/webcrypto/nss/aes_key_nss.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_CHILD_WEBCRYPTO_NSS_AES_NSS_H_ 5 #ifndef CONTENT_CHILD_WEBCRYPTO_NSS_AES_NSS_H_
6 #define CONTENT_CHILD_WEBCRYPTO_NSS_AES_NSS_H_ 6 #define CONTENT_CHILD_WEBCRYPTO_NSS_AES_NSS_H_
7 7
8 #include <pkcs11t.h> 8 #include <pkcs11t.h>
9 9
10 #include "content/child/webcrypto/algorithm_implementation.h" 10 #include "content/child/webcrypto/algorithm_implementation.h"
(...skipping 20 matching lines...) Expand all
31 31
32 // This is the same as the other AesAlgorithm constructor, however 32 // This is the same as the other AesAlgorithm constructor, however
33 // |import_flags| and |all_key_usages| are pre-filled to values for 33 // |import_flags| and |all_key_usages| are pre-filled to values for
34 // encryption/decryption algorithms (supports usages for: encrypt, decrypt, 34 // encryption/decryption algorithms (supports usages for: encrypt, decrypt,
35 // wrap, unwrap). 35 // wrap, unwrap).
36 AesAlgorithm(CK_MECHANISM_TYPE import_mechanism, 36 AesAlgorithm(CK_MECHANISM_TYPE import_mechanism,
37 const std::string& jwk_suffix); 37 const std::string& jwk_suffix);
38 38
39 virtual Status GenerateKey(const blink::WebCryptoAlgorithm& algorithm, 39 virtual Status GenerateKey(const blink::WebCryptoAlgorithm& algorithm,
40 bool extractable, 40 bool extractable,
41 blink::WebCryptoKeyUsageMask usage_mask, 41 blink::WebCryptoKeyUsageMask usages,
42 GenerateKeyResult* result) const override; 42 GenerateKeyResult* result) const override;
43 43
44 virtual Status VerifyKeyUsagesBeforeImportKey( 44 virtual Status VerifyKeyUsagesBeforeImportKey(
45 blink::WebCryptoKeyFormat format, 45 blink::WebCryptoKeyFormat format,
46 blink::WebCryptoKeyUsageMask usage_mask) const override; 46 blink::WebCryptoKeyUsageMask usages) const override;
47 47
48 virtual Status ImportKeyRaw(const CryptoData& key_data, 48 virtual Status ImportKeyRaw(const CryptoData& key_data,
49 const blink::WebCryptoAlgorithm& algorithm, 49 const blink::WebCryptoAlgorithm& algorithm,
50 bool extractable, 50 bool extractable,
51 blink::WebCryptoKeyUsageMask usage_mask, 51 blink::WebCryptoKeyUsageMask usages,
52 blink::WebCryptoKey* key) const override; 52 blink::WebCryptoKey* key) const override;
53 53
54 virtual Status ImportKeyJwk(const CryptoData& key_data, 54 virtual Status ImportKeyJwk(const CryptoData& key_data,
55 const blink::WebCryptoAlgorithm& algorithm, 55 const blink::WebCryptoAlgorithm& algorithm,
56 bool extractable, 56 bool extractable,
57 blink::WebCryptoKeyUsageMask usage_mask, 57 blink::WebCryptoKeyUsageMask usages,
58 blink::WebCryptoKey* key) const override; 58 blink::WebCryptoKey* key) const override;
59 59
60 virtual Status ExportKeyRaw(const blink::WebCryptoKey& key, 60 virtual Status ExportKeyRaw(const blink::WebCryptoKey& key,
61 std::vector<uint8_t>* buffer) const override; 61 std::vector<uint8_t>* buffer) const override;
62 62
63 virtual Status ExportKeyJwk(const blink::WebCryptoKey& key, 63 virtual Status ExportKeyJwk(const blink::WebCryptoKey& key,
64 std::vector<uint8_t>* buffer) const override; 64 std::vector<uint8_t>* buffer) const override;
65 65
66 private: 66 private:
67 const CK_MECHANISM_TYPE import_mechanism_; 67 const CK_MECHANISM_TYPE import_mechanism_;
68 const CK_FLAGS import_flags_; 68 const CK_FLAGS import_flags_;
69 const blink::WebCryptoKeyUsageMask all_key_usages_; 69 const blink::WebCryptoKeyUsageMask all_key_usages_;
70 const std::string jwk_suffix_; 70 const std::string jwk_suffix_;
71 }; 71 };
72 72
73 } // namespace webcrypto 73 } // namespace webcrypto
74 74
75 } // namespace content 75 } // namespace content
76 76
77 #endif // CONTENT_CHILD_WEBCRYPTO_NSS_AES_NSS_H_ 77 #endif // CONTENT_CHILD_WEBCRYPTO_NSS_AES_NSS_H_
OLDNEW
« no previous file with comments | « content/child/webcrypto/nss/aes_gcm_nss.cc ('k') | content/child/webcrypto/nss/aes_key_nss.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698