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

Side by Side Diff: content/renderer/webcrypto/webcrypto_impl.cc

Issue 178073007: [webcrypto] Update to use the KeyAlgorithm. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove unrelated change that makes public keys extractable Created 6 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "content/renderer/webcrypto/webcrypto_impl.h" 5 #include "content/renderer/webcrypto/webcrypto_impl.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "content/renderer/webcrypto/crypto_data.h" 8 #include "content/renderer/webcrypto/crypto_data.h"
9 #include "content/renderer/webcrypto/shared_crypto.h" 9 #include "content/renderer/webcrypto/shared_crypto.h"
10 #include "content/renderer/webcrypto/webcrypto_util.h" 10 #include "content/renderer/webcrypto/webcrypto_util.h"
11 #include "third_party/WebKit/public/platform/WebString.h" 11 #include "third_party/WebKit/public/platform/WebString.h"
12 #ifdef WEBCRYPTO_HAS_KEY_ALGORITHM
13 #include "third_party/WebKit/public/platform/WebCryptoKeyAlgorithm.h"
14 #endif
12 15
13 namespace content { 16 namespace content {
14 17
15 using webcrypto::Status; 18 using webcrypto::Status;
16 19
17 namespace { 20 namespace {
18 21
19 void CompleteWithError(const Status& status, blink::WebCryptoResult* result) { 22 void CompleteWithError(const Status& status, blink::WebCryptoResult* result) {
20 DCHECK(status.IsError()); 23 DCHECK(status.IsError());
21 if (status.HasErrorDetails()) 24 if (status.HasErrorDetails())
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 unsigned int data_size, 203 unsigned int data_size,
201 blink::WebArrayBuffer& result) { 204 blink::WebArrayBuffer& result) {
202 blink::WebCryptoAlgorithm algorithm = 205 blink::WebCryptoAlgorithm algorithm =
203 blink::WebCryptoAlgorithm::adoptParamsAndCreate(algorithm_id, NULL); 206 blink::WebCryptoAlgorithm::adoptParamsAndCreate(algorithm_id, NULL);
204 return (webcrypto::Digest( 207 return (webcrypto::Digest(
205 algorithm, webcrypto::CryptoData(data, data_size), &result)) 208 algorithm, webcrypto::CryptoData(data, data_size), &result))
206 .IsSuccess(); 209 .IsSuccess();
207 } 210 }
208 211
209 } // namespace content 212 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/webcrypto/shared_crypto_unittest.cc ('k') | content/renderer/webcrypto/webcrypto_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698