| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |