Chromium Code Reviews| Index: Source/platform/exported/WebCryptoKeyAlgorithm.cpp |
| diff --git a/Source/platform/exported/WebCryptoKeyAlgorithm.cpp b/Source/platform/exported/WebCryptoKeyAlgorithm.cpp |
| index bef587d0d25dbd6e796cacba6688ed7e2bc256b6..b69acc47db2df33ad11dc6e762850801b62b4955 100644 |
| --- a/Source/platform/exported/WebCryptoKeyAlgorithm.cpp |
| +++ b/Source/platform/exported/WebCryptoKeyAlgorithm.cpp |
| @@ -93,6 +93,11 @@ WebCryptoKeyAlgorithm WebCryptoKeyAlgorithm::createEc(WebCryptoAlgorithmId id, W |
| return WebCryptoKeyAlgorithm(id, adoptPtr(new WebCryptoEcKeyAlgorithmParams(namedCurve))); |
| } |
| +WebCryptoKeyAlgorithm WebCryptoKeyAlgorithm::create(WebCryptoAlgorithmId id) |
|
eroman
2014/12/23 20:58:24
Call this createHkdf() instead and omit the ID par
nharper
2014/12/23 22:46:59
Done.
|
| +{ |
| + return WebCryptoKeyAlgorithm(id, nullptr); |
|
eroman
2014/12/23 20:58:24
We should find out from the working group if this
eroman
2014/12/23 22:03:53
Actually I am fairly confident a "length" attribut
nharper
2014/12/23 22:46:59
PBKDF2 and CONCAT both have no extra params for Ke
eroman
2014/12/23 23:34:29
The other reason HMAC needs it, is HMAC keys are n
|
| +} |
| + |
| bool WebCryptoKeyAlgorithm::isNull() const |
| { |
| return m_private.isNull(); |
| @@ -148,7 +153,8 @@ void WebCryptoKeyAlgorithm::writeToDictionary(WebCryptoKeyAlgorithmDictionary* d |
| { |
| ASSERT(!isNull()); |
| dict->setString("name", WebCryptoAlgorithm::lookupAlgorithmInfo(id())->name); |
| - m_private->params.get()->writeToDictionary(dict); |
| + if (m_private->params.get()) |
| + m_private->params.get()->writeToDictionary(dict); |
| } |
| void WebCryptoKeyAlgorithm::assign(const WebCryptoKeyAlgorithm& other) |