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

Unified Diff: public/platform/WebCryptoAlgorithmParams.h

Issue 789733009: Implement HKDF for WebCrypto (blink-side) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: move ASSERT(), add break 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') | public/platform/WebCryptoKeyAlgorithm.h » ('j') | 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 61bacf539aab87394968c4a765b0d58ee4355d47..0108115134ea1d92148d0417af371e0fb763a27f 100644
--- a/public/platform/WebCryptoAlgorithmParams.h
+++ b/public/platform/WebCryptoAlgorithmParams.h
@@ -337,6 +337,29 @@ private:
const unsigned short m_lengthBits;
};
+class WebCryptoHkdfParams : public WebCryptoAlgorithmParamsWithHash {
+public:
+ WebCryptoHkdfParams(const WebCryptoAlgorithm& hash, const unsigned char* salt, unsigned saltSize, const unsigned char* info, unsigned infoSize)
+ : WebCryptoAlgorithmParamsWithHash(hash)
+ , m_salt(salt, saltSize)
+ , m_info(info, infoSize)
+ {
+ }
+
+ const WebVector<unsigned char>& salt() const { return m_salt; }
+
+ const WebVector<unsigned char>& info() const { return m_info; }
+
+ virtual WebCryptoAlgorithmParamsType type() const
+ {
+ return WebCryptoAlgorithmParamsTypeHkdfParams;
+ }
+
+private:
+ const WebVector<unsigned char> m_salt;
+ const WebVector<unsigned char> m_info;
+};
+
} // namespace blink
#endif
« no previous file with comments | « public/platform/WebCryptoAlgorithm.h ('k') | public/platform/WebCryptoKeyAlgorithm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698