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 #include "content/child/webcrypto/algorithm_implementation.h" | 5 #include "content/child/webcrypto/algorithm_implementation.h" |
6 | 6 |
7 #include "content/child/webcrypto/status.h" | 7 #include "content/child/webcrypto/status.h" |
8 | 8 |
9 namespace content { | 9 namespace content { |
10 | 10 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 return Status::ErrorUnsupported(); | 45 return Status::ErrorUnsupported(); |
46 } | 46 } |
47 | 47 |
48 Status AlgorithmImplementation::Digest( | 48 Status AlgorithmImplementation::Digest( |
49 const blink::WebCryptoAlgorithm& algorithm, | 49 const blink::WebCryptoAlgorithm& algorithm, |
50 const CryptoData& data, | 50 const CryptoData& data, |
51 std::vector<uint8_t>* buffer) const { | 51 std::vector<uint8_t>* buffer) const { |
52 return Status::ErrorUnsupported(); | 52 return Status::ErrorUnsupported(); |
53 } | 53 } |
54 | 54 |
55 Status AlgorithmImplementation::VerifyKeyUsagesBeforeGenerateKey( | 55 Status AlgorithmImplementation::GenerateKey( |
56 blink::WebCryptoKeyUsageMask usage_mask) const { | 56 const blink::WebCryptoAlgorithm& algorithm, |
| 57 bool extractable, |
| 58 blink::WebCryptoKeyUsageMask usage_mask, |
| 59 GenerateKeyResult* result) const { |
57 return Status::ErrorUnsupported(); | 60 return Status::ErrorUnsupported(); |
58 } | 61 } |
59 | 62 |
60 Status AlgorithmImplementation::VerifyKeyUsagesBeforeGenerateKeyPair( | |
61 blink::WebCryptoKeyUsageMask usage_mask, | |
62 blink::WebCryptoKeyUsageMask* public_usage_mask, | |
63 blink::WebCryptoKeyUsageMask* private_usage_mask) const { | |
64 *public_usage_mask = *private_usage_mask = 0; | |
65 return Status::ErrorUnsupported(); | |
66 } | |
67 | |
68 Status AlgorithmImplementation::GenerateSecretKey( | |
69 const blink::WebCryptoAlgorithm& algorithm, | |
70 bool extractable, | |
71 blink::WebCryptoKeyUsageMask usage_mask, | |
72 blink::WebCryptoKey* key) const { | |
73 return Status::ErrorUnsupported(); | |
74 } | |
75 | |
76 Status AlgorithmImplementation::GenerateKeyPair( | |
77 const blink::WebCryptoAlgorithm& algorithm, | |
78 bool extractable, | |
79 blink::WebCryptoKeyUsageMask public_usage_mask, | |
80 blink::WebCryptoKeyUsageMask private_usage_mask, | |
81 blink::WebCryptoKey* public_key, | |
82 blink::WebCryptoKey* private_key) const { | |
83 return Status::ErrorUnsupported(); | |
84 } | |
85 | |
86 Status AlgorithmImplementation::VerifyKeyUsagesBeforeImportKey( | 63 Status AlgorithmImplementation::VerifyKeyUsagesBeforeImportKey( |
87 blink::WebCryptoKeyFormat format, | 64 blink::WebCryptoKeyFormat format, |
88 blink::WebCryptoKeyUsageMask usage_mask) const { | 65 blink::WebCryptoKeyUsageMask usage_mask) const { |
89 return Status::ErrorUnsupportedImportKeyFormat(); | 66 return Status::ErrorUnsupportedImportKeyFormat(); |
90 } | 67 } |
91 | 68 |
92 Status AlgorithmImplementation::ImportKeyRaw( | 69 Status AlgorithmImplementation::ImportKeyRaw( |
93 const CryptoData& key_data, | 70 const CryptoData& key_data, |
94 const blink::WebCryptoAlgorithm& algorithm, | 71 const blink::WebCryptoAlgorithm& algorithm, |
95 bool extractable, | 72 bool extractable, |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 | 122 |
146 Status AlgorithmImplementation::ExportKeyJwk( | 123 Status AlgorithmImplementation::ExportKeyJwk( |
147 const blink::WebCryptoKey& key, | 124 const blink::WebCryptoKey& key, |
148 std::vector<uint8_t>* buffer) const { | 125 std::vector<uint8_t>* buffer) const { |
149 return Status::ErrorUnsupportedExportKeyFormat(); | 126 return Status::ErrorUnsupportedExportKeyFormat(); |
150 } | 127 } |
151 | 128 |
152 } // namespace webcrypto | 129 } // namespace webcrypto |
153 | 130 |
154 } // namespace content | 131 } // namespace content |
OLD | NEW |