Virgil Security Crypto library  2.0.7
VirgilSigner.h
1 
37 #ifndef VIRGIL_SIGNER_H
38 #define VIRGIL_SIGNER_H
39 
40 #include <virgil/crypto/VirgilByteArray.h>
41 #include <virgil/crypto/foundation/VirgilHash.h>
42 
43 namespace virgil { namespace crypto {
44 
50 class VirgilSigner {
51 public:
57 
63  const VirgilByteArray& data, const VirgilByteArray& privateKey,
64  const VirgilByteArray& privateKeyPassword = VirgilByteArray());
65 
70  bool verify(const VirgilByteArray& data, const VirgilByteArray& sign, const VirgilByteArray& publicKey);
71 
72 public:
74  VirgilSigner& operator=(VirgilSigner&& rhs) noexcept;
75 
76  VirgilSigner(VirgilSigner&& rhs) noexcept;
78 private:
80 };
81 
82 }}
83 
84 #endif /* VIRGIL_SIGNER_H */
Algorithm
Enumerates possible Hash algorithms.
Definition: VirgilHash.h:57
VirgilByteArray sign(const VirgilByteArray &data, const VirgilByteArray &privateKey, const VirgilByteArray &privateKeyPassword=VirgilByteArray())
Sign data with given private key.
Provides hashing (message digest) algorithms.
Definition: VirgilHash.h:52
bool verify(const VirgilByteArray &data, const VirgilByteArray &sign, const VirgilByteArray &publicKey)
Verify sign and data to be conformed to the given public key.
VirgilSigner(foundation::VirgilHash::Algorithm hashAlgorithm=foundation::VirgilHash::Algorithm::SHA384)
Create signer with predefined hash function.
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:53
This class provides high-level interface to sign and verify data using Virgil Security keys...
Definition: VirgilSigner.h:50