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

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: rebase Created 6 years 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
Index: public/platform/WebCryptoAlgorithmParams.h
diff --git a/public/platform/WebCryptoAlgorithmParams.h b/public/platform/WebCryptoAlgorithmParams.h
index 61bacf539aab87394968c4a765b0d58ee4355d47..c3ec8272ca1546c8477dbe9e1e61edcf9233e083 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:
+ WebVector<unsigned char> m_salt;
eroman 2014/12/23 20:58:24 const
nharper 2014/12/23 22:46:59 Done.
+ WebVector<unsigned char> m_info;
+};
+
} // namespace blink
#endif

Powered by Google App Engine
This is Rietveld 408576698