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

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

Issue 820523003: [webcrypto] Implement PBKDF2 (blink-side) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Added Layout tests Created 5 years, 11 months 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
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698