OLD | NEW |
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_SHARED_CRYPTO_H_ | 5 #ifndef CONTENT_CHILD_WEBCRYPTO_SHARED_CRYPTO_H_ |
6 #define CONTENT_CHILD_WEBCRYPTO_SHARED_CRYPTO_H_ | 6 #define CONTENT_CHILD_WEBCRYPTO_SHARED_CRYPTO_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 CONTENT_EXPORT Status | 96 CONTENT_EXPORT Status |
97 GenerateKeyPair(const blink::WebCryptoAlgorithm& algorithm, | 97 GenerateKeyPair(const blink::WebCryptoAlgorithm& algorithm, |
98 bool extractable, | 98 bool extractable, |
99 blink::WebCryptoKeyUsageMask usage_mask, | 99 blink::WebCryptoKeyUsageMask usage_mask, |
100 blink::WebCryptoKey* public_key, | 100 blink::WebCryptoKey* public_key, |
101 blink::WebCryptoKey* private_key); | 101 blink::WebCryptoKey* private_key); |
102 | 102 |
103 CONTENT_EXPORT Status | 103 CONTENT_EXPORT Status |
104 ImportKey(blink::WebCryptoKeyFormat format, | 104 ImportKey(blink::WebCryptoKeyFormat format, |
105 const CryptoData& key_data, | 105 const CryptoData& key_data, |
106 const blink::WebCryptoAlgorithm& algorithm_or_null, | 106 const blink::WebCryptoAlgorithm& algorithm, |
107 bool extractable, | 107 bool extractable, |
108 blink::WebCryptoKeyUsageMask usage_mask, | 108 blink::WebCryptoKeyUsageMask usage_mask, |
109 blink::WebCryptoKey* key); | 109 blink::WebCryptoKey* key); |
110 | 110 |
111 CONTENT_EXPORT Status ExportKey(blink::WebCryptoKeyFormat format, | 111 CONTENT_EXPORT Status ExportKey(blink::WebCryptoKeyFormat format, |
112 const blink::WebCryptoKey& key, | 112 const blink::WebCryptoKey& key, |
113 blink::WebArrayBuffer* buffer); | 113 blink::WebArrayBuffer* buffer); |
114 | 114 |
115 CONTENT_EXPORT Status Sign(const blink::WebCryptoAlgorithm& algorithm, | 115 CONTENT_EXPORT Status Sign(const blink::WebCryptoAlgorithm& algorithm, |
116 const blink::WebCryptoKey& key, | 116 const blink::WebCryptoKey& key, |
117 const CryptoData& data, | 117 const CryptoData& data, |
118 blink::WebArrayBuffer* buffer); | 118 blink::WebArrayBuffer* buffer); |
119 | 119 |
120 CONTENT_EXPORT Status | 120 CONTENT_EXPORT Status |
121 VerifySignature(const blink::WebCryptoAlgorithm& algorithm, | 121 VerifySignature(const blink::WebCryptoAlgorithm& algorithm, |
122 const blink::WebCryptoKey& key, | 122 const blink::WebCryptoKey& key, |
123 const CryptoData& signature, | 123 const CryptoData& signature, |
124 const CryptoData& data, | 124 const CryptoData& data, |
125 bool* signature_match); | 125 bool* signature_match); |
126 | 126 |
127 CONTENT_EXPORT Status | 127 CONTENT_EXPORT Status |
128 ImportKeyJwk(const CryptoData& key_data, | 128 ImportKeyJwk(const CryptoData& key_data, |
129 const blink::WebCryptoAlgorithm& algorithm_or_null, | 129 const blink::WebCryptoAlgorithm& algorithm, |
130 bool extractable, | 130 bool extractable, |
131 blink::WebCryptoKeyUsageMask usage_mask, | 131 blink::WebCryptoKeyUsageMask usage_mask, |
132 blink::WebCryptoKey* key); | 132 blink::WebCryptoKey* key); |
133 | 133 |
134 CONTENT_EXPORT Status | 134 CONTENT_EXPORT Status |
135 WrapKey(blink::WebCryptoKeyFormat format, | 135 WrapKey(blink::WebCryptoKeyFormat format, |
136 const blink::WebCryptoKey& wrapping_key, | 136 const blink::WebCryptoKey& wrapping_key, |
137 const blink::WebCryptoKey& key_to_wrap, | 137 const blink::WebCryptoKey& key_to_wrap, |
138 const blink::WebCryptoAlgorithm& wrapping_algorithm, | 138 const blink::WebCryptoAlgorithm& wrapping_algorithm, |
139 blink::WebArrayBuffer* buffer); | 139 blink::WebArrayBuffer* buffer); |
140 | 140 |
141 CONTENT_EXPORT Status | 141 CONTENT_EXPORT Status |
142 UnwrapKey(blink::WebCryptoKeyFormat format, | 142 UnwrapKey(blink::WebCryptoKeyFormat format, |
143 const CryptoData& wrapped_key_data, | 143 const CryptoData& wrapped_key_data, |
144 const blink::WebCryptoKey& wrapping_key, | 144 const blink::WebCryptoKey& wrapping_key, |
145 const blink::WebCryptoAlgorithm& wrapping_algorithm, | 145 const blink::WebCryptoAlgorithm& wrapping_algorithm, |
146 const blink::WebCryptoAlgorithm& algorithm_or_null, | 146 const blink::WebCryptoAlgorithm& algorithm, |
147 bool extractable, | 147 bool extractable, |
148 blink::WebCryptoKeyUsageMask usage_mask, | 148 blink::WebCryptoKeyUsageMask usage_mask, |
149 blink::WebCryptoKey* key); | 149 blink::WebCryptoKey* key); |
150 | 150 |
151 } // namespace webcrypto | 151 } // namespace webcrypto |
152 | 152 |
153 } // namespace content | 153 } // namespace content |
154 | 154 |
155 #endif // CONTENT_CHILD_WEBCRYPTO_SHARED_CRYPTO_H_ | 155 #endif // CONTENT_CHILD_WEBCRYPTO_SHARED_CRYPTO_H_ |
OLD | NEW |