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

Unified Diff: trunk/public/platform/WebCryptoKeyAlgorithmParams.h

Issue 296333002: Revert 174726 "[webcrypto] Remove RSA-ES support (3 of 3)" (Closed) Base URL: svn://svn.chromium.org/blink/
Patch Set: Created 6 years, 7 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 | « trunk/public/platform/WebCryptoKeyAlgorithm.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/public/platform/WebCryptoKeyAlgorithmParams.h
===================================================================
--- trunk/public/platform/WebCryptoKeyAlgorithmParams.h (revision 174732)
+++ trunk/public/platform/WebCryptoKeyAlgorithmParams.h (working copy)
@@ -41,6 +41,7 @@
WebCryptoKeyAlgorithmParamsTypeNone,
WebCryptoKeyAlgorithmParamsTypeHmac,
WebCryptoKeyAlgorithmParamsTypeAes,
+ WebCryptoKeyAlgorithmParamsTypeRsa,
WebCryptoKeyAlgorithmParamsTypeRsaHashed
};
@@ -102,12 +103,11 @@
unsigned m_lengthBits;
};
-class WebCryptoRsaHashedKeyAlgorithmParams : public WebCryptoKeyAlgorithmParams {
+class WebCryptoRsaKeyAlgorithmParams : public WebCryptoKeyAlgorithmParams {
public:
- WebCryptoRsaHashedKeyAlgorithmParams(unsigned modulusLengthBits, const unsigned char* publicExponent, unsigned publicExponentSize, const WebCryptoAlgorithm& hash)
+ WebCryptoRsaKeyAlgorithmParams(unsigned modulusLengthBits, const unsigned char* publicExponent, unsigned publicExponentSize)
: m_modulusLengthBits(modulusLengthBits)
, m_publicExponent(publicExponent, publicExponentSize)
- , m_hash(hash)
{
}
@@ -121,6 +121,24 @@
return m_publicExponent;
}
+ virtual WebCryptoKeyAlgorithmParamsType type() const
+ {
+ return WebCryptoKeyAlgorithmParamsTypeRsa;
+ }
+
+private:
+ unsigned m_modulusLengthBits;
+ WebVector<unsigned char> m_publicExponent;
+};
+
+class WebCryptoRsaHashedKeyAlgorithmParams : public WebCryptoRsaKeyAlgorithmParams {
+public:
+ WebCryptoRsaHashedKeyAlgorithmParams(unsigned modulusLengthBits, const unsigned char* publicExponent, unsigned publicExponentSize, const WebCryptoAlgorithm& hash)
+ : WebCryptoRsaKeyAlgorithmParams(modulusLengthBits, publicExponent, publicExponentSize)
+ , m_hash(hash)
+ {
+ }
+
const WebCryptoAlgorithm& hash() const
{
return m_hash;
@@ -132,8 +150,6 @@
}
private:
- unsigned m_modulusLengthBits;
- WebVector<unsigned char> m_publicExponent;
WebCryptoAlgorithm m_hash;
};
« no previous file with comments | « trunk/public/platform/WebCryptoKeyAlgorithm.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698