Virgil Security Crypto library  2.6.3
VirgilSeqSigner.h
1 
37 #ifndef VIRGIL_SEQ_SIGNER_H
38 #define VIRGIL_SEQ_SIGNER_H
39 
40 #include "VirgilSignerBase.h"
41 
42 #include "VirgilByteArray.h"
43 #include "foundation/VirgilHash.h"
44 
45 #include <memory>
46 
47 namespace virgil { namespace crypto {
48 
55 public:
60  explicit VirgilSeqSigner (
62 
66  void startSigning();
67 
72  void startVerifying(const VirgilByteArray& signature);
73 
78  void update(const VirgilByteArray& data);
79 
84  VirgilByteArray sign(const VirgilByteArray& privateKey,
85  const VirgilByteArray& privateKeyPassword = VirgilByteArray());
86 
91  bool verify(const VirgilByteArray& publicKey);
92 
93 private:
94  VirgilByteArray unpackedSignature_;
96 };
97 
98 }}
99 
100 #endif /* VIRGIL_SEQ_SIGNER_H */
Algorithm
Enumerates possible Hash algorithms.
Definition: VirgilHash.h:57
void startVerifying(const VirgilByteArray &signature)
VirgilSeqSigner(foundation::VirgilHash::Algorithm hashAlgorithm=foundation::VirgilHash::Algorithm::SHA384)
Create signer with predefined hash function.
Provides hashing (message digest) algorithms.
Definition: VirgilHash.h:52
This class provides common functionality to sign and verify data using Virgil Security keys...
Definition: VirgilSignerBase.h:49
Root namespace for all Virgil Security libraries.
Definition: VirgilAsn1Compatible.h:46
std::vector< unsigned char > VirgilByteArray
This type represents a sequence of bytes.
Definition: VirgilByteArray.h:50
bool verify(const VirgilByteArray &publicKey)
Verify sign and data that was collected by update() function to be conformed to the given public key...
This class provides high-level interface to sign and verify data using Virgil Security keys...
Definition: VirgilSeqSigner.h:54
void update(const VirgilByteArray &data)
VirgilByteArray sign(const VirgilByteArray &privateKey, const VirgilByteArray &privateKeyPassword=VirgilByteArray())
Sign data that was collected by update() function.