Virgil Security Crypto library  1.8.2
VirgilStreamSigner.h
1 
37 #ifndef VIRGIL_STREAM_SIGNER_H
38 #define VIRGIL_STREAM_SIGNER_H
39 
40 #include <virgil/crypto/VirgilByteArray.h>
41 #include <virgil/crypto/VirgilDataSource.h>
42 #include <virgil/crypto/foundation/VirgilHash.h>
43 
44 namespace virgil { namespace crypto {
45 
52 public:
57  explicit VirgilStreamSigner(
59  virgil::crypto::foundation::VirgilHash::sha384());
60 
65  VirgilByteArray sign(
66  VirgilDataSource& source, const VirgilByteArray& privateKey,
67  const VirgilByteArray& privateKeyPassword = VirgilByteArray());
68 
73  bool verify(VirgilDataSource& source, const VirgilByteArray& sign, const VirgilByteArray& publicKey);
74 
75 private:
77 };
78 
79 }}
80 
81 #endif /* VIRGIL_STREAM_SIGNER_H */
VirgilByteArray sign(VirgilDataSource &source, const VirgilByteArray &privateKey, const VirgilByteArray &privateKeyPassword=VirgilByteArray())
Sign data provided by the source with given private key.
bool verify(VirgilDataSource &source, const VirgilByteArray &sign, const VirgilByteArray &publicKey)
Verify sign and data provided by the source to be conformed to the given public key.
Provides hashing (message digest) algorithms.
Definition: VirgilHash.h:57
This class provides high-level interface to sign and verify data using Virgil Security keys...
Definition: VirgilStreamSigner.h:51
Definition: VirgilAsn1Compatible.h:46
This is base class for input streams.
Definition: VirgilDataSource.h:49
VirgilStreamSigner(const virgil::crypto::foundation::VirgilHash &hash=virgil::crypto::foundation::VirgilHash::sha384())
Create signer with predefined hash function.