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

Side by Side Diff: content/child/webcrypto/shared_crypto.cc

Issue 194203002: [webcrypto] Remove support for SHA-224 (CL 2 or 3). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 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 "content/child/webcrypto/shared_crypto.h" 5 #include "content/child/webcrypto/shared_crypto.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "content/child/webcrypto/crypto_data.h" 8 #include "content/child/webcrypto/crypto_data.h"
9 #include "content/child/webcrypto/platform_crypto.h" 9 #include "content/child/webcrypto/platform_crypto.h"
10 #include "content/child/webcrypto/webcrypto_util.h" 10 #include "content/child/webcrypto/webcrypto_util.h"
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 default: 277 default:
278 return Status::ErrorUnsupported(); 278 return Status::ErrorUnsupported();
279 } 279 }
280 } 280 }
281 281
282 Status Digest(const blink::WebCryptoAlgorithm& algorithm, 282 Status Digest(const blink::WebCryptoAlgorithm& algorithm,
283 const CryptoData& data, 283 const CryptoData& data,
284 blink::WebArrayBuffer* buffer) { 284 blink::WebArrayBuffer* buffer) {
285 switch (algorithm.id()) { 285 switch (algorithm.id()) {
286 case blink::WebCryptoAlgorithmIdSha1: 286 case blink::WebCryptoAlgorithmIdSha1:
287 case blink::WebCryptoAlgorithmIdSha224:
288 case blink::WebCryptoAlgorithmIdSha256: 287 case blink::WebCryptoAlgorithmIdSha256:
289 case blink::WebCryptoAlgorithmIdSha384: 288 case blink::WebCryptoAlgorithmIdSha384:
290 case blink::WebCryptoAlgorithmIdSha512: 289 case blink::WebCryptoAlgorithmIdSha512:
291 return platform::DigestSha(algorithm.id(), data, buffer); 290 return platform::DigestSha(algorithm.id(), data, buffer);
292 default: 291 default:
293 return Status::ErrorUnsupported(); 292 return Status::ErrorUnsupported();
294 } 293 }
295 } 294 }
296 295
297 Status GenerateSecretKey(const blink::WebCryptoAlgorithm& algorithm, 296 Status GenerateSecretKey(const blink::WebCryptoAlgorithm& algorithm,
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
566 key); 565 key);
567 } 566 }
568 default: 567 default:
569 return Status::ErrorUnsupported(); 568 return Status::ErrorUnsupported();
570 } 569 }
571 } 570 }
572 571
573 } // namespace webcrypto 572 } // namespace webcrypto
574 573
575 } // namespace content 574 } // namespace content
OLDNEW
« no previous file with comments | « content/child/webcrypto/platform_crypto_openssl.cc ('k') | content/child/webcrypto/shared_crypto_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698