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

Unified Diff: public/platform/WebCryptoAlgorithmParams.h

Issue 707743002: WebCrypto: Add ECDSA algorithm (Blink side). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase onto master Created 6 years, 1 month 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 8d8cc8705c3b7a9901b19886042b7b8afedaff4f..2315b493751214229441d9234ca8f37103472d73 100644
--- a/public/platform/WebCryptoAlgorithmParams.h
+++ b/public/platform/WebCryptoAlgorithmParams.h
@@ -247,6 +247,46 @@ private:
const unsigned m_saltLengthBytes;
};
+class WebCryptoEcdsaParams : public WebCryptoAlgorithmParamsWithHash {
+public:
+ explicit WebCryptoEcdsaParams(const WebCryptoAlgorithm& hash)
+ : WebCryptoAlgorithmParamsWithHash(hash)
+ {
+ }
+
+ virtual WebCryptoAlgorithmParamsType type() const { return WebCryptoAlgorithmParamsTypeEcdsaParams; }
+};
+
+class WebCryptoEcKeyGenParams : public WebCryptoAlgorithmParams {
+public:
+ explicit WebCryptoEcKeyGenParams(WebCryptoNamedCurve namedCurve)
+ : m_namedCurve(namedCurve)
+ {
+ }
+
+ virtual WebCryptoAlgorithmParamsType type() const { return WebCryptoAlgorithmParamsTypeEcKeyGenParams; }
+
+ WebCryptoNamedCurve namedCurve() const { return m_namedCurve; }
+
+private:
+ const WebCryptoNamedCurve m_namedCurve;
+};
+
+class WebCryptoEcKeyImportParams : public WebCryptoAlgorithmParams {
+public:
+ explicit WebCryptoEcKeyImportParams(WebCryptoNamedCurve namedCurve)
+ : m_namedCurve(namedCurve)
+ {
+ }
+
+ virtual WebCryptoAlgorithmParamsType type() const { return WebCryptoAlgorithmParamsTypeEcKeyImportParams; }
+
+ WebCryptoNamedCurve namedCurve() const { return m_namedCurve; }
+
+private:
+ const WebCryptoNamedCurve m_namedCurve;
+};
+
} // 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