| 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 <stdint.h> | 8 #include <stdint.h> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 // On success it is guaranteed that: | 74 // On success it is guaranteed that: |
| 75 // * public_exponent is either 3 or 65537 | 75 // * public_exponent is either 3 or 65537 |
| 76 // * modulus_length_bits is a multiple of 8 | 76 // * modulus_length_bits is a multiple of 8 |
| 77 // * modulus_length is >= 256 | 77 // * modulus_length is >= 256 |
| 78 // * modulus_length is <= 16K | 78 // * modulus_length is <= 16K |
| 79 Status GetRsaKeyGenParameters( | 79 Status GetRsaKeyGenParameters( |
| 80 const blink::WebCryptoRsaHashedKeyGenParams* params, | 80 const blink::WebCryptoRsaHashedKeyGenParams* params, |
| 81 unsigned int* public_exponent, | 81 unsigned int* public_exponent, |
| 82 unsigned int* modulus_length_bits); | 82 unsigned int* modulus_length_bits); |
| 83 | 83 |
| 84 // Verifies that |usages| is valid when importing a key of the given format. |
| 85 Status VerifyUsagesBeforeImportAsymmetricKey( |
| 86 blink::WebCryptoKeyFormat format, |
| 87 blink::WebCryptoKeyUsageMask all_public_key_usages, |
| 88 blink::WebCryptoKeyUsageMask all_private_key_usages, |
| 89 blink::WebCryptoKeyUsageMask usages); |
| 90 |
| 84 } // namespace webcrypto | 91 } // namespace webcrypto |
| 85 | 92 |
| 86 } // namespace content | 93 } // namespace content |
| 87 | 94 |
| 88 #endif // CONTENT_CHILD_WEBCRYPTO_WEBCRYPTO_UTIL_H_ | 95 #endif // CONTENT_CHILD_WEBCRYPTO_WEBCRYPTO_UTIL_H_ |
| OLD | NEW |