Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(265)

Side by Side Diff: components/webcrypto/nss/hmac_nss.cc

Issue 1077273002: html_viewer: Move webcrypto to a place where html_viewer can use it. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase to ToT Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « components/webcrypto/nss/aes_kw_nss.cc ('k') | components/webcrypto/nss/key_nss.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 {
25
26 namespace webcrypto { 24 namespace webcrypto {
27 25
28 namespace { 26 namespace {
29 27
30 const blink::WebCryptoKeyUsageMask kAllKeyUsages = 28 const blink::WebCryptoKeyUsageMask kAllKeyUsages =
31 blink::WebCryptoKeyUsageSign | blink::WebCryptoKeyUsageVerify; 29 blink::WebCryptoKeyUsageSign | blink::WebCryptoKeyUsageVerify;
32 30
33 bool WebCryptoHashToHMACMechanism(const blink::WebCryptoAlgorithm& algorithm, 31 bool WebCryptoHashToHMACMechanism(const blink::WebCryptoAlgorithm& algorithm,
34 CK_MECHANISM_TYPE* mechanism) { 32 CK_MECHANISM_TYPE* mechanism) {
35 switch (algorithm.id()) { 33 switch (algorithm.id()) {
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 } 252 }
255 }; 253 };
256 254
257 } // namespace 255 } // namespace
258 256
259 AlgorithmImplementation* CreatePlatformHmacImplementation() { 257 AlgorithmImplementation* CreatePlatformHmacImplementation() {
260 return new HmacImplementation; 258 return new HmacImplementation;
261 } 259 }
262 260
263 } // namespace webcrypto 261 } // namespace webcrypto
264
265 } // namespace content
OLDNEW
« no previous file with comments | « components/webcrypto/nss/aes_kw_nss.cc ('k') | components/webcrypto/nss/key_nss.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698