| 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 "base/logging.h" | 5 #include "base/logging.h" |
| 6 #include "content/child/webcrypto/openssl/aes_key_openssl.h" | 6 #include "content/child/webcrypto/openssl/aes_key_openssl.h" |
| 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 namespace { | 13 namespace { |
| 14 | 14 |
| 15 class AesKwImplementation : public AesAlgorithm { | 15 class AesKwImplementation : public AesAlgorithm { |
| 16 public: | 16 public: |
| 17 AesKwImplementation() : AesAlgorithm("KW") {} | 17 AesKwImplementation() : AesAlgorithm("KW") {} |
| 18 | 18 |
| 19 virtual Status Encrypt(const blink::WebCryptoAlgorithm& algorithm, | 19 virtual Status Encrypt(const blink::WebCryptoAlgorithm& algorithm, |
| 20 const blink::WebCryptoKey& key, | 20 const blink::WebCryptoKey& key, |
| 21 const CryptoData& data, | 21 const CryptoData& data, |
| 22 std::vector<uint8>* buffer) const OVERRIDE { | 22 std::vector<uint8_t>* buffer) const OVERRIDE { |
| 23 // TODO(eroman): | 23 // TODO(eroman): |
| 24 return Status::ErrorUnsupported(); | 24 return Status::ErrorUnsupported(); |
| 25 } | 25 } |
| 26 | 26 |
| 27 virtual Status Decrypt(const blink::WebCryptoAlgorithm& algorithm, | 27 virtual Status Decrypt(const blink::WebCryptoAlgorithm& algorithm, |
| 28 const blink::WebCryptoKey& key, | 28 const blink::WebCryptoKey& key, |
| 29 const CryptoData& data, | 29 const CryptoData& data, |
| 30 std::vector<uint8>* buffer) const OVERRIDE { | 30 std::vector<uint8_t>* buffer) const OVERRIDE { |
| 31 // TODO(eroman): | 31 // TODO(eroman): |
| 32 return Status::ErrorUnsupported(); | 32 return Status::ErrorUnsupported(); |
| 33 } | 33 } |
| 34 }; | 34 }; |
| 35 | 35 |
| 36 } // namespace | 36 } // namespace |
| 37 | 37 |
| 38 AlgorithmImplementation* CreatePlatformAesKwImplementation() { | 38 AlgorithmImplementation* CreatePlatformAesKwImplementation() { |
| 39 return new AesKwImplementation; | 39 return new AesKwImplementation; |
| 40 } | 40 } |
| 41 | 41 |
| 42 } // namespace webcrypto | 42 } // namespace webcrypto |
| 43 | 43 |
| 44 } // namespace content | 44 } // namespace content |
| OLD | NEW |