Virgil Security Crypto library  2.4.6
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
VirgilStreamSigner.h
1 
37 #ifndef VIRGIL_STREAM_SIGNER_H
38 #define VIRGIL_STREAM_SIGNER_H
39 
40 #include "VirgilSignerBase.h"
41 
42 #include "VirgilByteArray.h"
43 #include "VirgilDataSource.h"
44 #include "foundation/VirgilHash.h"
45 
46 namespace virgil { namespace crypto {
47 
54 public:
59  explicit VirgilStreamSigner (
60  foundation::VirgilHash::Algorithm hashAlgorithm =
62 
68  VirgilDataSource& source, const VirgilByteArray& privateKey,
69  const VirgilByteArray& privateKeyPassword = VirgilByteArray());
70 
75  bool verify(VirgilDataSource& source, const VirgilByteArray& sign, const VirgilByteArray& publicKey);
76 };
77 
78 }}
79 
80 #endif /* VIRGIL_STREAM_SIGNER_H */
Algorithm
Enumerates possible Hash algorithms.
Definition: VirgilHash.h:57
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.
This class provides high-level interface to sign and verify data using Virgil Security keys...
Definition: VirgilStreamSigner.h:53
This class provides common functionality to sign and verify data using Virgil Security keys...
Definition: VirgilSignerBase.h:49
std::vector< unsigned char > VirgilByteArray
This type represents a sequence of bytes.
Definition: VirgilByteArray.h:50
This is base class for input streams.
Definition: VirgilDataSource.h:49
VirgilStreamSigner(foundation::VirgilHash::Algorithm hashAlgorithm=foundation::VirgilHash::Algorithm::SHA384)
Create signer with predefined hash function.
Definition: VirgilStreamSigner.h:59