| 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_WEBCRYPTO_UTIL_H_ | 5 #ifndef CONTENT_CHILD_WEBCRYPTO_WEBCRYPTO_UTIL_H_ |
| 6 #define CONTENT_CHILD_WEBCRYPTO_WEBCRYPTO_UTIL_H_ | 6 #define CONTENT_CHILD_WEBCRYPTO_WEBCRYPTO_UTIL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 280 // Creates an RSA-OAEP algorithm. It is an error to call this with a hash_id | 280 // Creates an RSA-OAEP algorithm. It is an error to call this with a hash_id |
| 281 // that is not a SHA*. | 281 // that is not a SHA*. |
| 282 blink::WebCryptoAlgorithm CreateRsaOaepImportAlgorithm( | 282 blink::WebCryptoAlgorithm CreateRsaOaepImportAlgorithm( |
| 283 blink::WebCryptoAlgorithmId hash_id); | 283 blink::WebCryptoAlgorithmId hash_id); |
| 284 | 284 |
| 285 // TODO(eroman): Move to shared_crypto.cc | 285 // TODO(eroman): Move to shared_crypto.cc |
| 286 // Returns the internal block size for SHA-* | 286 // Returns the internal block size for SHA-* |
| 287 unsigned int ShaBlockSizeBytes(blink::WebCryptoAlgorithmId hash_id); | 287 unsigned int ShaBlockSizeBytes(blink::WebCryptoAlgorithmId hash_id); |
| 288 | 288 |
| 289 bool CreateSecretKeyAlgorithm(const blink::WebCryptoAlgorithm& algorithm, | 289 bool CreateSecretKeyAlgorithm(const blink::WebCryptoAlgorithm& algorithm, |
| 290 unsigned keylen_bytes, | 290 unsigned int keylen_bytes, |
| 291 blink::WebCryptoKeyAlgorithm* key_algorithm); | 291 blink::WebCryptoKeyAlgorithm* key_algorithm); |
| 292 | 292 |
| 293 } // namespace webcrypto | 293 } // namespace webcrypto |
| 294 | 294 |
| 295 } // namespace content | 295 } // namespace content |
| 296 | 296 |
| 297 #endif // CONTENT_CHILD_WEBCRYPTO_WEBCRYPTO_UTIL_H_ | 297 #endif // CONTENT_CHILD_WEBCRYPTO_WEBCRYPTO_UTIL_H_ |
| OLD | NEW |