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

Unified Diff: public/platform/WebCryptoAlgorithmParams.h

Issue 21759002: WebCrypto: Add algorithm normalization rules for RSASSA-PKCS1-v1_5. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 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
Index: public/platform/WebCryptoAlgorithmParams.h
diff --git a/public/platform/WebCryptoAlgorithmParams.h b/public/platform/WebCryptoAlgorithmParams.h
index 37056bb3ccb6ad8e5d898f7c96d70d6287a4162a..cab0700b0ccc51e22b62fdc20380967726611683 100644
--- a/public/platform/WebCryptoAlgorithmParams.h
+++ b/public/platform/WebCryptoAlgorithmParams.h
@@ -101,6 +101,37 @@ private:
WebCryptoAlgorithm m_hash;
};
+class WebCryptoRsaSsaParams : public WebCryptoAlgorithmParams {
+public:
+ WebCryptoRsaSsaParams(const WebCryptoAlgorithm& hash)
abarth-chromium 2013/08/02 17:56:56 explicit?
eroman 2013/08/02 19:25:42 Done.
+ : WebCryptoAlgorithmParams(WebCryptoAlgorithmParamsTypeRsaSsaParams)
+ , m_hash(hash)
+ {
+ }
+
+ const WebCryptoAlgorithm& hash() const { return m_hash; }
+
+private:
+ WebCryptoAlgorithm m_hash;
+};
+
+class WebCryptoRsaKeyGenParams : public WebCryptoAlgorithmParams {
+public:
+ WebCryptoRsaKeyGenParams(unsigned modulusLength, const unsigned char* publicExponent, size_t publicExponentSize)
+ : WebCryptoAlgorithmParams(WebCryptoAlgorithmParamsTypeRsaKeyGenParams)
+ , m_modulusLength(modulusLength)
+ , m_publicExponent(publicExponent, publicExponentSize)
+ {
+ }
+
+ unsigned modulusLength() const { return m_modulusLength; }
+ const WebVector<unsigned char>& publicExponent() const { return m_publicExponent; }
+
+private:
+ const unsigned m_modulusLength;
+ const WebVector<unsigned char> m_publicExponent;
+};
+
} // namespace WebKit
#endif
« Source/modules/crypto/NormalizeAlgorithm.cpp ('K') | « public/platform/WebCryptoAlgorithm.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698