| 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 #include <vector> | 10 #include <vector> |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 blink::WebCryptoAlgorithmId hash_id); | 64 blink::WebCryptoAlgorithmId hash_id); |
| 65 | 65 |
| 66 // Returns true if the set bits in b make up a subset of the set bits in a. | 66 // Returns true if the set bits in b make up a subset of the set bits in a. |
| 67 bool ContainsKeyUsages(blink::WebCryptoKeyUsageMask a, | 67 bool ContainsKeyUsages(blink::WebCryptoKeyUsageMask a, |
| 68 blink::WebCryptoKeyUsageMask b); | 68 blink::WebCryptoKeyUsageMask b); |
| 69 | 69 |
| 70 bool KeyUsageAllows(const blink::WebCryptoKey& key, | 70 bool KeyUsageAllows(const blink::WebCryptoKey& key, |
| 71 const blink::WebCryptoKeyUsage usage); | 71 const blink::WebCryptoKeyUsage usage); |
| 72 | 72 |
| 73 bool IsAlgorithmRsa(blink::WebCryptoAlgorithmId alg_id); | 73 bool IsAlgorithmRsa(blink::WebCryptoAlgorithmId alg_id); |
| 74 bool IsAlgorithmAsymmetric(blink::WebCryptoAlgorithmId alg_id); | |
| 75 | 74 |
| 76 Status GetAesGcmTagLengthInBits(const blink::WebCryptoAesGcmParams* params, | 75 Status GetAesGcmTagLengthInBits(const blink::WebCryptoAesGcmParams* params, |
| 77 unsigned int* tag_length_bits); | 76 unsigned int* tag_length_bits); |
| 78 | 77 |
| 79 Status GetAesKeyGenLengthInBits(const blink::WebCryptoAesKeyGenParams* params, | 78 Status GetAesKeyGenLengthInBits(const blink::WebCryptoAesKeyGenParams* params, |
| 80 unsigned int* keylen_bits); | 79 unsigned int* keylen_bits); |
| 81 | 80 |
| 82 Status GetHmacKeyGenLengthInBits(const blink::WebCryptoHmacKeyGenParams* params, | 81 Status GetHmacKeyGenLengthInBits(const blink::WebCryptoHmacKeyGenParams* params, |
| 83 unsigned int* keylen_bits); | 82 unsigned int* keylen_bits); |
| 84 | 83 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 96 Status GetRsaKeyGenParameters( | 95 Status GetRsaKeyGenParameters( |
| 97 const blink::WebCryptoRsaHashedKeyGenParams* params, | 96 const blink::WebCryptoRsaHashedKeyGenParams* params, |
| 98 unsigned int* public_exponent, | 97 unsigned int* public_exponent, |
| 99 unsigned int* modulus_length_bits); | 98 unsigned int* modulus_length_bits); |
| 100 | 99 |
| 101 } // namespace webcrypto | 100 } // namespace webcrypto |
| 102 | 101 |
| 103 } // namespace content | 102 } // namespace content |
| 104 | 103 |
| 105 #endif // CONTENT_CHILD_WEBCRYPTO_WEBCRYPTO_UTIL_H_ | 104 #endif // CONTENT_CHILD_WEBCRYPTO_WEBCRYPTO_UTIL_H_ |
| OLD | NEW |