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

Side by Side Diff: components/webcrypto/nss/aes_cbc_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_algorithm_nss.cc ('k') | components/webcrypto/nss/aes_gcm_nss.cc » ('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 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
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
OLDNEW
« no previous file with comments | « components/webcrypto/nss/aes_algorithm_nss.cc ('k') | components/webcrypto/nss/aes_gcm_nss.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698