diff options
author | lloyd <[email protected]> | 2008-09-30 03:51:38 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2008-09-30 03:51:38 +0000 |
commit | ae0901dde9282d1b9c2de7a1fac4a41c8043d59c (patch) | |
tree | 3250c45eecdca61edfc44e650f40988506d6f7c7 /src/cms/cms_enc.h | |
parent | 0dca71e64c81d0b75f32beeadfe38d57c148db5b (diff) |
Many updates for the CMS code to bring up to date with current API
Diffstat (limited to 'src/cms/cms_enc.h')
-rw-r--r-- | src/cms/cms_enc.h | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/src/cms/cms_enc.h b/src/cms/cms_enc.h index 6bdde8813..c1c49b2e4 100644 --- a/src/cms/cms_enc.h +++ b/src/cms/cms_enc.h @@ -18,15 +18,22 @@ namespace Botan { class CMS_Encoder { public: - void encrypt(const X509_Certificate&, const std::string = ""); - void encrypt(const std::string&, const std::string& = ""); - void encrypt(const SymmetricKey&, const std::string& = ""); + + void encrypt(RandomNumberGenerator&, + const X509_Certificate&, const std::string = ""); + + void encrypt(RandomNumberGenerator& rng, + const std::string&, const std::string& = ""); + + void encrypt(RandomNumberGenerator& rng, + const SymmetricKey&, const std::string& = ""); void authenticate(const X509_Certificate&, const std::string& = ""); void authenticate(const std::string&, const std::string& = ""); void authenticate(const SymmetricKey&, const std::string& = ""); - void sign(X509_Store&, const PKCS8_PrivateKey&); + void sign(X509_Store&, const PKCS8_PrivateKey&, + RandomNumberGenerator& rng); void digest(const std::string& = ""); void compress(const std::string&); @@ -43,12 +50,15 @@ class CMS_Encoder private: void add_layer(const std::string&, DER_Encoder&); - void encrypt_ktri(const X509_Certificate&, PK_Encrypting_Key*, + void encrypt_ktri(RandomNumberGenerator&, + const X509_Certificate&, PK_Encrypting_Key*, const std::string&); - void encrypt_kari(const X509_Certificate&, X509_PublicKey*, + void encrypt_kari(RandomNumberGenerator&, + const X509_Certificate&, X509_PublicKey*, const std::string&); - SecureVector<byte> do_encrypt(const SymmetricKey&, const std::string&); + SecureVector<byte> do_encrypt(RandomNumberGenerator& rng, + const SymmetricKey&, const std::string&); static SecureVector<byte> make_econtent(const SecureVector<byte>&, const std::string&); |