| 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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::GenerateKey( | 55 Status AlgorithmImplementation::GenerateKey( |
| 56 const blink::WebCryptoAlgorithm& algorithm, | 56 const blink::WebCryptoAlgorithm& algorithm, |
| 57 bool extractable, | 57 bool extractable, |
| 58 blink::WebCryptoKeyUsageMask usage_mask, | 58 blink::WebCryptoKeyUsageMask usages, |
| 59 GenerateKeyResult* result) const { | 59 GenerateKeyResult* result) const { |
| 60 return Status::ErrorUnsupported(); | 60 return Status::ErrorUnsupported(); |
| 61 } | 61 } |
| 62 | 62 |
| 63 Status AlgorithmImplementation::VerifyKeyUsagesBeforeImportKey( | 63 Status AlgorithmImplementation::VerifyKeyUsagesBeforeImportKey( |
| 64 blink::WebCryptoKeyFormat format, | 64 blink::WebCryptoKeyFormat format, |
| 65 blink::WebCryptoKeyUsageMask usage_mask) const { | 65 blink::WebCryptoKeyUsageMask usages) const { |
| 66 return Status::ErrorUnsupportedImportKeyFormat(); | 66 return Status::ErrorUnsupportedImportKeyFormat(); |
| 67 } | 67 } |
| 68 | 68 |
| 69 Status AlgorithmImplementation::ImportKeyRaw( | 69 Status AlgorithmImplementation::ImportKeyRaw( |
| 70 const CryptoData& key_data, | 70 const CryptoData& key_data, |
| 71 const blink::WebCryptoAlgorithm& algorithm, | 71 const blink::WebCryptoAlgorithm& algorithm, |
| 72 bool extractable, | 72 bool extractable, |
| 73 blink::WebCryptoKeyUsageMask usage_mask, | 73 blink::WebCryptoKeyUsageMask usages, |
| 74 blink::WebCryptoKey* key) const { | 74 blink::WebCryptoKey* key) const { |
| 75 return Status::ErrorUnsupportedImportKeyFormat(); | 75 return Status::ErrorUnsupportedImportKeyFormat(); |
| 76 } | 76 } |
| 77 | 77 |
| 78 Status AlgorithmImplementation::ImportKeyPkcs8( | 78 Status AlgorithmImplementation::ImportKeyPkcs8( |
| 79 const CryptoData& key_data, | 79 const CryptoData& key_data, |
| 80 const blink::WebCryptoAlgorithm& algorithm, | 80 const blink::WebCryptoAlgorithm& algorithm, |
| 81 bool extractable, | 81 bool extractable, |
| 82 blink::WebCryptoKeyUsageMask usage_mask, | 82 blink::WebCryptoKeyUsageMask usages, |
| 83 blink::WebCryptoKey* key) const { | 83 blink::WebCryptoKey* key) const { |
| 84 return Status::ErrorUnsupportedImportKeyFormat(); | 84 return Status::ErrorUnsupportedImportKeyFormat(); |
| 85 } | 85 } |
| 86 | 86 |
| 87 Status AlgorithmImplementation::ImportKeySpki( | 87 Status AlgorithmImplementation::ImportKeySpki( |
| 88 const CryptoData& key_data, | 88 const CryptoData& key_data, |
| 89 const blink::WebCryptoAlgorithm& algorithm, | 89 const blink::WebCryptoAlgorithm& algorithm, |
| 90 bool extractable, | 90 bool extractable, |
| 91 blink::WebCryptoKeyUsageMask usage_mask, | 91 blink::WebCryptoKeyUsageMask usages, |
| 92 blink::WebCryptoKey* key) const { | 92 blink::WebCryptoKey* key) const { |
| 93 return Status::ErrorUnsupportedImportKeyFormat(); | 93 return Status::ErrorUnsupportedImportKeyFormat(); |
| 94 } | 94 } |
| 95 | 95 |
| 96 Status AlgorithmImplementation::ImportKeyJwk( | 96 Status AlgorithmImplementation::ImportKeyJwk( |
| 97 const CryptoData& key_data, | 97 const CryptoData& key_data, |
| 98 const blink::WebCryptoAlgorithm& algorithm, | 98 const blink::WebCryptoAlgorithm& algorithm, |
| 99 bool extractable, | 99 bool extractable, |
| 100 blink::WebCryptoKeyUsageMask usage_mask, | 100 blink::WebCryptoKeyUsageMask usages, |
| 101 blink::WebCryptoKey* key) const { | 101 blink::WebCryptoKey* key) const { |
| 102 return Status::ErrorUnsupportedImportKeyFormat(); | 102 return Status::ErrorUnsupportedImportKeyFormat(); |
| 103 } | 103 } |
| 104 | 104 |
| 105 Status AlgorithmImplementation::ExportKeyRaw( | 105 Status AlgorithmImplementation::ExportKeyRaw( |
| 106 const blink::WebCryptoKey& key, | 106 const blink::WebCryptoKey& key, |
| 107 std::vector<uint8_t>* buffer) const { | 107 std::vector<uint8_t>* buffer) const { |
| 108 return Status::ErrorUnsupportedExportKeyFormat(); | 108 return Status::ErrorUnsupportedExportKeyFormat(); |
| 109 } | 109 } |
| 110 | 110 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 122 | 122 |
| 123 Status AlgorithmImplementation::ExportKeyJwk( | 123 Status AlgorithmImplementation::ExportKeyJwk( |
| 124 const blink::WebCryptoKey& key, | 124 const blink::WebCryptoKey& key, |
| 125 std::vector<uint8_t>* buffer) const { | 125 std::vector<uint8_t>* buffer) const { |
| 126 return Status::ErrorUnsupportedExportKeyFormat(); | 126 return Status::ErrorUnsupportedExportKeyFormat(); |
| 127 } | 127 } |
| 128 | 128 |
| 129 } // namespace webcrypto | 129 } // namespace webcrypto |
| 130 | 130 |
| 131 } // namespace content | 131 } // namespace content |
| OLD | NEW |