Chromium Code Reviews| Index: crypto/signature_creator.h |
| diff --git a/crypto/signature_creator.h b/crypto/signature_creator.h |
| index ab9d2c1a21b58cf9e7205668f517c03377c8456a..9fb47b64b6917a344277f41f7bfe4074cc45cf2c 100644 |
| --- a/crypto/signature_creator.h |
| +++ b/crypto/signature_creator.h |
| @@ -40,6 +40,11 @@ class CRYPTO_EXPORT SignatureCreator { |
| // specified. |
| static SignatureCreator* Create(RSAPrivateKey* key, HashAlgorithm hash_alg); |
| + // Create an instance. The caller must ensure that the provided PrivateKey |
| + // instance outlives the created SignatureCreator. Uses the HashAlgorithm |
| + // specified. The generated signature will be in the RSA-PSS format. |
| + static SignatureCreator* CreatePSS(RSAPrivateKey* key, |
| + HashAlgorithm hash_alg); |
| // Signs the precomputed |hash_alg| digest |data| using private |key| as |
| // specified in PKCS #1 v1.5. |
|
Ryan Sleevi
2015/08/25 20:01:38
This of course would be inconsistent with your pro
|
| @@ -56,6 +61,10 @@ class CRYPTO_EXPORT SignatureCreator { |
| bool Final(std::vector<uint8>* signature); |
| private: |
| + static SignatureCreator* CreateImpl(RSAPrivateKey* key, |
|
Ryan Sleevi
2015/08/25 20:01:38
This doesn't actually need to be static, does it?
|
| + HashAlgorithm hash_alg, |
| + bool use_pss); |
| + |
| // Private constructor. Use the Create() method instead. |
| SignatureCreator(); |