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 |
11 namespace webcrypto { | 11 namespace webcrypto { |
12 | 12 |
13 AlgorithmImplementation::~AlgorithmImplementation() { | 13 AlgorithmImplementation::~AlgorithmImplementation() { |
14 } | 14 } |
15 | 15 |
16 Status AlgorithmImplementation::Encrypt( | 16 Status AlgorithmImplementation::Encrypt( |
17 const blink::WebCryptoAlgorithm& algorithm, | 17 const blink::WebCryptoAlgorithm& algorithm, |
18 const blink::WebCryptoKey& key, | 18 const blink::WebCryptoKey& key, |
19 const CryptoData& data, | 19 const CryptoData& data, |
20 std::vector<uint8>* buffer) const { | 20 std::vector<uint8_t>* buffer) const { |
21 return Status::ErrorUnsupported(); | 21 return Status::ErrorUnsupported(); |
22 } | 22 } |
23 | 23 |
24 Status AlgorithmImplementation::Decrypt( | 24 Status AlgorithmImplementation::Decrypt( |
25 const blink::WebCryptoAlgorithm& algorithm, | 25 const blink::WebCryptoAlgorithm& algorithm, |
26 const blink::WebCryptoKey& key, | 26 const blink::WebCryptoKey& key, |
27 const CryptoData& data, | 27 const CryptoData& data, |
28 std::vector<uint8>* buffer) const { | 28 std::vector<uint8_t>* buffer) const { |
29 return Status::ErrorUnsupported(); | 29 return Status::ErrorUnsupported(); |
30 } | 30 } |
31 | 31 |
32 Status AlgorithmImplementation::Sign(const blink::WebCryptoAlgorithm& algorithm, | 32 Status AlgorithmImplementation::Sign(const blink::WebCryptoAlgorithm& algorithm, |
33 const blink::WebCryptoKey& key, | 33 const blink::WebCryptoKey& key, |
34 const CryptoData& data, | 34 const CryptoData& data, |
35 std::vector<uint8>* buffer) const { | 35 std::vector<uint8_t>* buffer) const { |
36 return Status::ErrorUnsupported(); | 36 return Status::ErrorUnsupported(); |
37 } | 37 } |
38 | 38 |
39 Status AlgorithmImplementation::Verify( | 39 Status AlgorithmImplementation::Verify( |
40 const blink::WebCryptoAlgorithm& algorithm, | 40 const blink::WebCryptoAlgorithm& algorithm, |
41 const blink::WebCryptoKey& key, | 41 const blink::WebCryptoKey& key, |
42 const CryptoData& signature, | 42 const CryptoData& signature, |
43 const CryptoData& data, | 43 const CryptoData& data, |
44 bool* signature_match) const { | 44 bool* signature_match) const { |
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>* 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::VerifyKeyUsagesBeforeGenerateKey( |
56 blink::WebCryptoKeyUsageMask usage_mask) const { | 56 blink::WebCryptoKeyUsageMask usage_mask) const { |
57 return Status::ErrorUnsupported(); | 57 return Status::ErrorUnsupported(); |
58 } | 58 } |
59 | 59 |
60 Status AlgorithmImplementation::VerifyKeyUsagesBeforeGenerateKeyPair( | 60 Status AlgorithmImplementation::VerifyKeyUsagesBeforeGenerateKeyPair( |
61 blink::WebCryptoKeyUsageMask usage_mask, | 61 blink::WebCryptoKeyUsageMask usage_mask, |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 | 118 |
119 Status AlgorithmImplementation::ImportKeyJwk( | 119 Status AlgorithmImplementation::ImportKeyJwk( |
120 const CryptoData& key_data, | 120 const CryptoData& key_data, |
121 const blink::WebCryptoAlgorithm& algorithm, | 121 const blink::WebCryptoAlgorithm& algorithm, |
122 bool extractable, | 122 bool extractable, |
123 blink::WebCryptoKeyUsageMask usage_mask, | 123 blink::WebCryptoKeyUsageMask usage_mask, |
124 blink::WebCryptoKey* key) const { | 124 blink::WebCryptoKey* key) const { |
125 return Status::ErrorUnsupportedImportKeyFormat(); | 125 return Status::ErrorUnsupportedImportKeyFormat(); |
126 } | 126 } |
127 | 127 |
128 Status AlgorithmImplementation::ExportKeyRaw(const blink::WebCryptoKey& key, | 128 Status AlgorithmImplementation::ExportKeyRaw( |
129 std::vector<uint8>* buffer) const { | 129 const blink::WebCryptoKey& key, |
| 130 std::vector<uint8_t>* buffer) const { |
130 return Status::ErrorUnsupportedExportKeyFormat(); | 131 return Status::ErrorUnsupportedExportKeyFormat(); |
131 } | 132 } |
132 | 133 |
133 Status AlgorithmImplementation::ExportKeyPkcs8( | 134 Status AlgorithmImplementation::ExportKeyPkcs8( |
134 const blink::WebCryptoKey& key, | 135 const blink::WebCryptoKey& key, |
135 std::vector<uint8>* buffer) const { | 136 std::vector<uint8_t>* buffer) const { |
136 return Status::ErrorUnsupportedExportKeyFormat(); | 137 return Status::ErrorUnsupportedExportKeyFormat(); |
137 } | 138 } |
138 | 139 |
139 Status AlgorithmImplementation::ExportKeySpki( | 140 Status AlgorithmImplementation::ExportKeySpki( |
140 const blink::WebCryptoKey& key, | 141 const blink::WebCryptoKey& key, |
141 std::vector<uint8>* buffer) const { | 142 std::vector<uint8_t>* buffer) const { |
142 return Status::ErrorUnsupportedExportKeyFormat(); | 143 return Status::ErrorUnsupportedExportKeyFormat(); |
143 } | 144 } |
144 | 145 |
145 Status AlgorithmImplementation::ExportKeyJwk(const blink::WebCryptoKey& key, | 146 Status AlgorithmImplementation::ExportKeyJwk( |
146 std::vector<uint8>* buffer) const { | 147 const blink::WebCryptoKey& key, |
| 148 std::vector<uint8_t>* buffer) const { |
147 return Status::ErrorUnsupportedExportKeyFormat(); | 149 return Status::ErrorUnsupportedExportKeyFormat(); |
148 } | 150 } |
149 | 151 |
150 } // namespace webcrypto | 152 } // namespace webcrypto |
151 | 153 |
152 } // namespace content | 154 } // namespace content |
OLD | NEW |