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; |
}; |