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

Unified Diff: public/platform/WebCryptoAlgorithmParams.h

Issue 820523003: [webcrypto] Implement PBKDF2 (blink-side) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: nit 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « public/platform/WebCryptoAlgorithm.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/platform/WebCryptoAlgorithmParams.h
diff --git a/public/platform/WebCryptoAlgorithmParams.h b/public/platform/WebCryptoAlgorithmParams.h
index 0108115134ea1d92148d0417af371e0fb763a27f..dd05062fe7e912de29a1f05584da75a9ac2fd95e 100644
--- a/public/platform/WebCryptoAlgorithmParams.h
+++ b/public/platform/WebCryptoAlgorithmParams.h
@@ -360,6 +360,25 @@ private:
const WebVector<unsigned char> m_info;
};
+class WebCryptoPbkdf2Params : public WebCryptoAlgorithmParamsWithHash {
+public:
+ WebCryptoPbkdf2Params(const WebCryptoAlgorithm& hash, const unsigned char* salt, unsigned saltLength, unsigned iterations)
+ : WebCryptoAlgorithmParamsWithHash(hash)
+ , m_salt(salt, saltLength)
+ , m_iterations(iterations)
+ {
+ }
+
+ virtual WebCryptoAlgorithmParamsType type() const { return WebCryptoAlgorithmParamsTypePbkdf2Params; }
+
+ const WebVector<unsigned char>& salt() const { return m_salt; }
+ unsigned iterations() const { return m_iterations; }
+
+private:
+ const WebVector<unsigned char> m_salt;
+ const unsigned m_iterations;
+};
+
} // namespace blink
#endif
« no previous file with comments | « public/platform/WebCryptoAlgorithm.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698