| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2014 Google Inc. All rights reserved. | 2 * Copyright (C) 2014 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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 } | 124 } |
| 125 | 125 |
| 126 WebCryptoRsaHashedKeyAlgorithmParams* WebCryptoKeyAlgorithm::rsaHashedParams() c
onst | 126 WebCryptoRsaHashedKeyAlgorithmParams* WebCryptoKeyAlgorithm::rsaHashedParams() c
onst |
| 127 { | 127 { |
| 128 ASSERT(!isNull()); | 128 ASSERT(!isNull()); |
| 129 if (paramsType() == WebCryptoKeyAlgorithmParamsTypeRsaHashed) | 129 if (paramsType() == WebCryptoKeyAlgorithmParamsTypeRsaHashed) |
| 130 return static_cast<WebCryptoRsaHashedKeyAlgorithmParams*>(m_private->par
ams.get()); | 130 return static_cast<WebCryptoRsaHashedKeyAlgorithmParams*>(m_private->par
ams.get()); |
| 131 return 0; | 131 return 0; |
| 132 } | 132 } |
| 133 | 133 |
| 134 void WebCryptoKeyAlgorithm::writeToDictionary(WebCryptoKeyAlgorithmDictionary* d
ict) const |
| 135 { |
| 136 ASSERT(!isNull()); |
| 137 dict->setString("name", WebCryptoAlgorithm::lookupAlgorithmInfo(id())->name)
; |
| 138 m_private->params.get()->writeToDictionary(dict); |
| 139 } |
| 140 |
| 134 void WebCryptoKeyAlgorithm::assign(const WebCryptoKeyAlgorithm& other) | 141 void WebCryptoKeyAlgorithm::assign(const WebCryptoKeyAlgorithm& other) |
| 135 { | 142 { |
| 136 m_private = other.m_private; | 143 m_private = other.m_private; |
| 137 } | 144 } |
| 138 | 145 |
| 139 void WebCryptoKeyAlgorithm::reset() | 146 void WebCryptoKeyAlgorithm::reset() |
| 140 { | 147 { |
| 141 m_private.reset(); | 148 m_private.reset(); |
| 142 } | 149 } |
| 143 | 150 |
| 144 } // namespace blink | 151 } // namespace blink |
| OLD | NEW |