| 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 if (!WebCryptoAlgorithm::isHash(hash)) | 86 if (!WebCryptoAlgorithm::isHash(hash)) |
| 87 return WebCryptoKeyAlgorithm(); | 87 return WebCryptoKeyAlgorithm(); |
| 88 return WebCryptoKeyAlgorithm(id, adoptPtr(new WebCryptoRsaHashedKeyAlgorithm
Params(modulusLengthBits, publicExponent, publicExponentSize, createHash(hash)))
); | 88 return WebCryptoKeyAlgorithm(id, adoptPtr(new WebCryptoRsaHashedKeyAlgorithm
Params(modulusLengthBits, publicExponent, publicExponentSize, createHash(hash)))
); |
| 89 } | 89 } |
| 90 | 90 |
| 91 WebCryptoKeyAlgorithm WebCryptoKeyAlgorithm::createEc(WebCryptoAlgorithmId id, W
ebCryptoNamedCurve namedCurve) | 91 WebCryptoKeyAlgorithm WebCryptoKeyAlgorithm::createEc(WebCryptoAlgorithmId id, W
ebCryptoNamedCurve namedCurve) |
| 92 { | 92 { |
| 93 return WebCryptoKeyAlgorithm(id, adoptPtr(new WebCryptoEcKeyAlgorithmParams(
namedCurve))); | 93 return WebCryptoKeyAlgorithm(id, adoptPtr(new WebCryptoEcKeyAlgorithmParams(
namedCurve))); |
| 94 } | 94 } |
| 95 | 95 |
| 96 WebCryptoKeyAlgorithm WebCryptoKeyAlgorithm::createPbkdf2(WebCryptoAlgorithmId i
d) |
| 97 { |
| 98 return WebCryptoKeyAlgorithm(id, adoptPtr(new WebCryptoPbkdf2KeyAlgorithmPar
ams())); |
| 99 } |
| 100 |
| 96 bool WebCryptoKeyAlgorithm::isNull() const | 101 bool WebCryptoKeyAlgorithm::isNull() const |
| 97 { | 102 { |
| 98 return m_private.isNull(); | 103 return m_private.isNull(); |
| 99 } | 104 } |
| 100 | 105 |
| 101 WebCryptoAlgorithmId WebCryptoKeyAlgorithm::id() const | 106 WebCryptoAlgorithmId WebCryptoKeyAlgorithm::id() const |
| 102 { | 107 { |
| 103 ASSERT(!isNull()); | 108 ASSERT(!isNull()); |
| 104 return m_private->id; | 109 return m_private->id; |
| 105 } | 110 } |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 { | 160 { |
| 156 m_private = other.m_private; | 161 m_private = other.m_private; |
| 157 } | 162 } |
| 158 | 163 |
| 159 void WebCryptoKeyAlgorithm::reset() | 164 void WebCryptoKeyAlgorithm::reset() |
| 160 { | 165 { |
| 161 m_private.reset(); | 166 m_private.reset(); |
| 162 } | 167 } |
| 163 | 168 |
| 164 } // namespace blink | 169 } // namespace blink |
| OLD | NEW |