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 #include <pk11pub.h> | 6 #include <pk11pub.h> |
7 #include <secerr.h> | 7 #include <secerr.h> |
8 #include <sechash.h> | 8 #include <sechash.h> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/stl_util.h" | 11 #include "base/stl_util.h" |
12 #include "content/child/webcrypto/algorithm_implementation.h" | 12 #include "components/webcrypto/algorithm_implementation.h" |
13 #include "content/child/webcrypto/crypto_data.h" | 13 #include "components/webcrypto/crypto_data.h" |
14 #include "content/child/webcrypto/jwk.h" | 14 #include "components/webcrypto/jwk.h" |
15 #include "content/child/webcrypto/nss/key_nss.h" | 15 #include "components/webcrypto/nss/key_nss.h" |
16 #include "content/child/webcrypto/nss/sym_key_nss.h" | 16 #include "components/webcrypto/nss/sym_key_nss.h" |
17 #include "content/child/webcrypto/nss/util_nss.h" | 17 #include "components/webcrypto/nss/util_nss.h" |
18 #include "content/child/webcrypto/status.h" | 18 #include "components/webcrypto/status.h" |
19 #include "content/child/webcrypto/webcrypto_util.h" | 19 #include "components/webcrypto/webcrypto_util.h" |
20 #include "crypto/secure_util.h" | 20 #include "crypto/secure_util.h" |
21 #include "third_party/WebKit/public/platform/WebCryptoAlgorithmParams.h" | 21 #include "third_party/WebKit/public/platform/WebCryptoAlgorithmParams.h" |
22 #include "third_party/WebKit/public/platform/WebCryptoKeyAlgorithm.h" | 22 #include "third_party/WebKit/public/platform/WebCryptoKeyAlgorithm.h" |
23 | 23 |
24 namespace content { | 24 namespace components { |
25 | 25 |
26 namespace webcrypto { | 26 namespace webcrypto { |
27 | 27 |
28 namespace { | 28 namespace { |
29 | 29 |
30 const blink::WebCryptoKeyUsageMask kAllKeyUsages = | 30 const blink::WebCryptoKeyUsageMask kAllKeyUsages = |
31 blink::WebCryptoKeyUsageSign | blink::WebCryptoKeyUsageVerify; | 31 blink::WebCryptoKeyUsageSign | blink::WebCryptoKeyUsageVerify; |
32 | 32 |
33 bool WebCryptoHashToHMACMechanism(const blink::WebCryptoAlgorithm& algorithm, | 33 bool WebCryptoHashToHMACMechanism(const blink::WebCryptoAlgorithm& algorithm, |
34 CK_MECHANISM_TYPE* mechanism) { | 34 CK_MECHANISM_TYPE* mechanism) { |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 }; | 255 }; |
256 | 256 |
257 } // namespace | 257 } // namespace |
258 | 258 |
259 AlgorithmImplementation* CreatePlatformHmacImplementation() { | 259 AlgorithmImplementation* CreatePlatformHmacImplementation() { |
260 return new HmacImplementation; | 260 return new HmacImplementation; |
261 } | 261 } |
262 | 262 |
263 } // namespace webcrypto | 263 } // namespace webcrypto |
264 | 264 |
265 } // namespace content | 265 } // namespace components |
OLD | NEW |