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_PLATFORM_CRYPTO_H_ | 5 #ifndef CONTENT_CHILD_WEBCRYPTO_PLATFORM_CRYPTO_H_ |
6 #define CONTENT_CHILD_WEBCRYPTO_PLATFORM_CRYPTO_H_ | 6 #define CONTENT_CHILD_WEBCRYPTO_PLATFORM_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 "third_party/WebKit/public/platform/WebArrayBuffer.h" | 10 #include "third_party/WebKit/public/platform/WebArrayBuffer.h" |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 | 149 |
150 // Preconditions: | 150 // Preconditions: |
151 // * algorithm.id() is for an RSA algorithm. | 151 // * algorithm.id() is for an RSA algorithm. |
152 Status ImportRsaPublicKey(const blink::WebCryptoAlgorithm& algorithm, | 152 Status ImportRsaPublicKey(const blink::WebCryptoAlgorithm& algorithm, |
153 bool extractable, | 153 bool extractable, |
154 blink::WebCryptoKeyUsageMask usage_mask, | 154 blink::WebCryptoKeyUsageMask usage_mask, |
155 const CryptoData& modulus_data, | 155 const CryptoData& modulus_data, |
156 const CryptoData& exponent_data, | 156 const CryptoData& exponent_data, |
157 blink::WebCryptoKey* key); | 157 blink::WebCryptoKey* key); |
158 | 158 |
159 Status ImportKeySpki(const blink::WebCryptoAlgorithm& algorithm_or_null, | 159 Status ImportKeySpki(const blink::WebCryptoAlgorithm& algorithm, |
160 const CryptoData& key_data, | 160 const CryptoData& key_data, |
161 bool extractable, | 161 bool extractable, |
162 blink::WebCryptoKeyUsageMask usage_mask, | 162 blink::WebCryptoKeyUsageMask usage_mask, |
163 blink::WebCryptoKey* key); | 163 blink::WebCryptoKey* key); |
164 | 164 |
165 Status ImportKeyPkcs8(const blink::WebCryptoAlgorithm& algorithm_or_null, | 165 Status ImportKeyPkcs8(const blink::WebCryptoAlgorithm& algorithm, |
166 const CryptoData& key_data, | 166 const CryptoData& key_data, |
167 bool extractable, | 167 bool extractable, |
168 blink::WebCryptoKeyUsageMask usage_mask, | 168 blink::WebCryptoKeyUsageMask usage_mask, |
169 blink::WebCryptoKey* key); | 169 blink::WebCryptoKey* key); |
170 | 170 |
171 // Preconditions: | 171 // Preconditions: |
172 // * |key| is non-null. | 172 // * |key| is non-null. |
173 Status ExportKeyRaw(SymKey* key, blink::WebArrayBuffer* buffer); | 173 Status ExportKeyRaw(SymKey* key, blink::WebArrayBuffer* buffer); |
174 | 174 |
175 // Preconditions: | 175 // Preconditions: |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 blink::WebCryptoKeyUsageMask usage_mask, | 228 blink::WebCryptoKeyUsageMask usage_mask, |
229 blink::WebCryptoKey* key); | 229 blink::WebCryptoKey* key); |
230 | 230 |
231 } // namespace platform | 231 } // namespace platform |
232 | 232 |
233 } // namespace webcrypto | 233 } // namespace webcrypto |
234 | 234 |
235 } // namespace content | 235 } // namespace content |
236 | 236 |
237 #endif // CONTENT_CHILD_WEBCRYPTO_PLATFORM_CRYPTO_H_ | 237 #endif // CONTENT_CHILD_WEBCRYPTO_PLATFORM_CRYPTO_H_ |
OLD | NEW |