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

Side by Side Diff: Source/platform/exported/WebCryptoAlgorithm.cpp

Issue 779723002: WebCrypto: Add parsing for the algorithm parameter AesDerivedKey. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: add override Created 6 years 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
« no previous file with comments | « Source/modules/crypto/NormalizeAlgorithm.cpp ('k') | public/platform/WebCryptoAlgorithm.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 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 } 422 }
423 423
424 const WebCryptoEcdhKeyDeriveParams* WebCryptoAlgorithm::ecdhKeyDeriveParams() co nst 424 const WebCryptoEcdhKeyDeriveParams* WebCryptoAlgorithm::ecdhKeyDeriveParams() co nst
425 { 425 {
426 ASSERT(!isNull()); 426 ASSERT(!isNull());
427 if (paramsType() == WebCryptoAlgorithmParamsTypeEcdhKeyDeriveParams) 427 if (paramsType() == WebCryptoAlgorithmParamsTypeEcdhKeyDeriveParams)
428 return static_cast<WebCryptoEcdhKeyDeriveParams*>(m_private->params.get( )); 428 return static_cast<WebCryptoEcdhKeyDeriveParams*>(m_private->params.get( ));
429 return 0; 429 return 0;
430 } 430 }
431 431
432 const WebCryptoAesDerivedKeyParams* WebCryptoAlgorithm::aesDerivedKeyParams() co nst
433 {
434 ASSERT(!isNull());
435 if (paramsType() == WebCryptoAlgorithmParamsTypeAesDerivedKeyParams)
436 return static_cast<WebCryptoAesDerivedKeyParams*>(m_private->params.get( ));
437 return 0;
438 }
439
432 bool WebCryptoAlgorithm::isHash(WebCryptoAlgorithmId id) 440 bool WebCryptoAlgorithm::isHash(WebCryptoAlgorithmId id)
433 { 441 {
434 switch (id) { 442 switch (id) {
435 case WebCryptoAlgorithmIdSha1: 443 case WebCryptoAlgorithmIdSha1:
436 case WebCryptoAlgorithmIdSha256: 444 case WebCryptoAlgorithmIdSha256:
437 case WebCryptoAlgorithmIdSha384: 445 case WebCryptoAlgorithmIdSha384:
438 case WebCryptoAlgorithmIdSha512: 446 case WebCryptoAlgorithmIdSha512:
439 return true; 447 return true;
440 case WebCryptoAlgorithmIdAesCbc: 448 case WebCryptoAlgorithmIdAesCbc:
441 case WebCryptoAlgorithmIdHmac: 449 case WebCryptoAlgorithmIdHmac:
(...skipping 14 matching lines...) Expand all
456 { 464 {
457 m_private = other.m_private; 465 m_private = other.m_private;
458 } 466 }
459 467
460 void WebCryptoAlgorithm::reset() 468 void WebCryptoAlgorithm::reset()
461 { 469 {
462 m_private.reset(); 470 m_private.reset();
463 } 471 }
464 472
465 } // namespace blink 473 } // namespace blink
OLDNEW
« no previous file with comments | « Source/modules/crypto/NormalizeAlgorithm.cpp ('k') | public/platform/WebCryptoAlgorithm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698