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 <cryptohi.h> | 5 #include <cryptohi.h> |
6 | 6 |
7 #include "base/numerics/safe_math.h" | 7 #include "base/numerics/safe_math.h" |
8 #include "base/stl_util.h" | 8 #include "base/stl_util.h" |
9 #include "content/child/webcrypto/crypto_data.h" | 9 #include "components/webcrypto/crypto_data.h" |
10 #include "content/child/webcrypto/nss/aes_algorithm_nss.h" | 10 #include "components/webcrypto/nss/aes_algorithm_nss.h" |
11 #include "content/child/webcrypto/nss/key_nss.h" | 11 #include "components/webcrypto/nss/key_nss.h" |
12 #include "content/child/webcrypto/nss/util_nss.h" | 12 #include "components/webcrypto/nss/util_nss.h" |
13 #include "content/child/webcrypto/status.h" | 13 #include "components/webcrypto/status.h" |
14 #include "content/child/webcrypto/webcrypto_util.h" | 14 #include "components/webcrypto/webcrypto_util.h" |
15 #include "crypto/scoped_nss_types.h" | 15 #include "crypto/scoped_nss_types.h" |
16 #include "third_party/WebKit/public/platform/WebCryptoAlgorithmParams.h" | 16 #include "third_party/WebKit/public/platform/WebCryptoAlgorithmParams.h" |
17 | 17 |
18 namespace content { | |
19 | |
20 namespace webcrypto { | 18 namespace webcrypto { |
21 | 19 |
22 namespace { | 20 namespace { |
23 | 21 |
24 Status AesCbcEncryptDecrypt(EncryptOrDecrypt mode, | 22 Status AesCbcEncryptDecrypt(EncryptOrDecrypt mode, |
25 const blink::WebCryptoAlgorithm& algorithm, | 23 const blink::WebCryptoAlgorithm& algorithm, |
26 const blink::WebCryptoKey& key, | 24 const blink::WebCryptoKey& key, |
27 const CryptoData& data, | 25 const CryptoData& data, |
28 std::vector<uint8_t>* buffer) { | 26 std::vector<uint8_t>* buffer) { |
29 const blink::WebCryptoAesCbcParams* params = algorithm.aesCbcParams(); | 27 const blink::WebCryptoAesCbcParams* params = algorithm.aesCbcParams(); |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 } | 111 } |
114 }; | 112 }; |
115 | 113 |
116 } // namespace | 114 } // namespace |
117 | 115 |
118 AlgorithmImplementation* CreatePlatformAesCbcImplementation() { | 116 AlgorithmImplementation* CreatePlatformAesCbcImplementation() { |
119 return new AesCbcImplementation; | 117 return new AesCbcImplementation; |
120 } | 118 } |
121 | 119 |
122 } // namespace webcrypto | 120 } // namespace webcrypto |
123 | |
124 } // namespace content | |
OLD | NEW |