Chromium Code Reviews| 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_TEST_TEST_HELPERS_H_ | 5 #ifndef CONTENT_CHILD_WEBCRYPTO_TEST_TEST_HELPERS_H_ |
| 6 #define CONTENT_CHILD_WEBCRYPTO_TEST_TEST_HELPERS_H_ | 6 #define CONTENT_CHILD_WEBCRYPTO_TEST_TEST_HELPERS_H_ |
| 7 | 7 |
| 8 #include <ostream> | 8 #include <ostream> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 30 matching lines...) Expand all Loading... | |
| 41 // webcrypto::Status and webcrypto::CryptoData | 41 // webcrypto::Status and webcrypto::CryptoData |
| 42 | 42 |
| 43 void PrintTo(const Status& status, ::std::ostream* os); | 43 void PrintTo(const Status& status, ::std::ostream* os); |
| 44 bool operator==(const Status& a, const Status& b); | 44 bool operator==(const Status& a, const Status& b); |
| 45 bool operator!=(const Status& a, const Status& b); | 45 bool operator!=(const Status& a, const Status& b); |
| 46 | 46 |
| 47 void PrintTo(const CryptoData& data, ::std::ostream* os); | 47 void PrintTo(const CryptoData& data, ::std::ostream* os); |
| 48 bool operator==(const CryptoData& a, const CryptoData& b); | 48 bool operator==(const CryptoData& a, const CryptoData& b); |
| 49 bool operator!=(const CryptoData& a, const CryptoData& b); | 49 bool operator!=(const CryptoData& a, const CryptoData& b); |
| 50 | 50 |
| 51 // Gives a human-readable description of |status| and any error it represents. | |
| 52 std::string StatusToString(const Status& status); | |
|
Ryan Sleevi
2014/10/24 23:00:57
It's no clear why this is needed over the PrintTo
eroman
2014/10/24 23:07:09
PrintTo() outputs to a stream, as used by gtest.
| |
| 53 | |
| 51 // TODO(eroman): For Linux builds using system NSS, AES-GCM and RSA-OAEP, and | 54 // TODO(eroman): For Linux builds using system NSS, AES-GCM and RSA-OAEP, and |
| 52 // RSA key import are a runtime dependency. | 55 // RSA key import are a runtime dependency. |
| 53 bool SupportsAesGcm(); | 56 bool SupportsAesGcm(); |
| 54 bool SupportsRsaOaep(); | 57 bool SupportsRsaOaep(); |
| 55 bool SupportsRsaPrivateKeyImport(); | 58 bool SupportsRsaPrivateKeyImport(); |
| 56 | 59 |
| 57 blink::WebCryptoAlgorithm CreateRsaHashedKeyGenAlgorithm( | 60 blink::WebCryptoAlgorithm CreateRsaHashedKeyGenAlgorithm( |
| 58 blink::WebCryptoAlgorithmId algorithm_id, | 61 blink::WebCryptoAlgorithmId algorithm_id, |
| 59 const blink::WebCryptoAlgorithmId hash_id, | 62 const blink::WebCryptoAlgorithmId hash_id, |
| 60 unsigned int modulus_length, | 63 unsigned int modulus_length, |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 185 bool extractable, | 188 bool extractable, |
| 186 blink::WebCryptoKeyUsageMask usages, | 189 blink::WebCryptoKeyUsageMask usages, |
| 187 blink::WebCryptoKey* public_key, | 190 blink::WebCryptoKey* public_key, |
| 188 blink::WebCryptoKey* private_key); | 191 blink::WebCryptoKey* private_key); |
| 189 | 192 |
| 190 } // namespace webcrypto | 193 } // namespace webcrypto |
| 191 | 194 |
| 192 } // namesapce content | 195 } // namesapce content |
| 193 | 196 |
| 194 #endif // CONTENT_CHILD_WEBCRYPTO_TEST_TEST_HELPERS_H_ | 197 #endif // CONTENT_CHILD_WEBCRYPTO_TEST_TEST_HELPERS_H_ |
| OLD | NEW |