| 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 blink::WebCryptoAlgorithmId hash_id); | 45 blink::WebCryptoAlgorithmId hash_id); |
| 46 | 46 |
| 47 // Returns true if the set bits in b make up a subset of the set bits in a. | 47 // Returns true if the set bits in b make up a subset of the set bits in a. |
| 48 bool ContainsKeyUsages(blink::WebCryptoKeyUsageMask a, | 48 bool ContainsKeyUsages(blink::WebCryptoKeyUsageMask a, |
| 49 blink::WebCryptoKeyUsageMask b); | 49 blink::WebCryptoKeyUsageMask b); |
| 50 | 50 |
| 51 bool KeyUsageAllows(const blink::WebCryptoKey& key, | 51 bool KeyUsageAllows(const blink::WebCryptoKey& key, |
| 52 const blink::WebCryptoKeyUsage usage); | 52 const blink::WebCryptoKeyUsage usage); |
| 53 | 53 |
| 54 bool IsAlgorithmRsa(blink::WebCryptoAlgorithmId alg_id); | 54 bool IsAlgorithmRsa(blink::WebCryptoAlgorithmId alg_id); |
| 55 bool IsAlgorithmAsymmetric(blink::WebCryptoAlgorithmId alg_id); | |
| 56 | 55 |
| 57 Status GetAesGcmTagLengthInBits(const blink::WebCryptoAesGcmParams* params, | 56 Status GetAesGcmTagLengthInBits(const blink::WebCryptoAesGcmParams* params, |
| 58 unsigned int* tag_length_bits); | 57 unsigned int* tag_length_bits); |
| 59 | 58 |
| 60 Status GetAesKeyGenLengthInBits(const blink::WebCryptoAesKeyGenParams* params, | 59 Status GetAesKeyGenLengthInBits(const blink::WebCryptoAesKeyGenParams* params, |
| 61 unsigned int* keylen_bits); | 60 unsigned int* keylen_bits); |
| 62 | 61 |
| 63 Status GetHmacKeyGenLengthInBits(const blink::WebCryptoHmacKeyGenParams* params, | 62 Status GetHmacKeyGenLengthInBits(const blink::WebCryptoHmacKeyGenParams* params, |
| 64 unsigned int* keylen_bits); | 63 unsigned int* keylen_bits); |
| 65 | 64 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 77 Status GetRsaKeyGenParameters( | 76 Status GetRsaKeyGenParameters( |
| 78 const blink::WebCryptoRsaHashedKeyGenParams* params, | 77 const blink::WebCryptoRsaHashedKeyGenParams* params, |
| 79 unsigned int* public_exponent, | 78 unsigned int* public_exponent, |
| 80 unsigned int* modulus_length_bits); | 79 unsigned int* modulus_length_bits); |
| 81 | 80 |
| 82 } // namespace webcrypto | 81 } // namespace webcrypto |
| 83 | 82 |
| 84 } // namespace content | 83 } // namespace content |
| 85 | 84 |
| 86 #endif // CONTENT_CHILD_WEBCRYPTO_WEBCRYPTO_UTIL_H_ | 85 #endif // CONTENT_CHILD_WEBCRYPTO_WEBCRYPTO_UTIL_H_ |
| OLD | NEW |