Virgil Security Crypto library  1.8.2
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:
56  explicit VirgilSigner(
58  virgil::crypto::foundation::VirgilHash::sha384());
59 
64  VirgilByteArray sign(
65  const VirgilByteArray& data, const VirgilByteArray& privateKey,
66  const VirgilByteArray& privateKeyPassword = VirgilByteArray());
67 
72  bool verify(const VirgilByteArray& data, const VirgilByteArray& sign, const VirgilByteArray& publicKey);
73 
74 private:
76 };
77 
78 }}
79 
80 #endif /* VIRGIL_SIGNER_H */
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:57
bool verify(const VirgilByteArray &data, const VirgilByteArray &sign, const VirgilByteArray &publicKey)
Verify sign and data to be conformed to the given public key.
Definition: VirgilAsn1Compatible.h:46
VirgilSigner(const virgil::crypto::foundation::VirgilHash &hash=virgil::crypto::foundation::VirgilHash::sha384())
Create signer with predefined hash function.
This class provides high-level interface to sign and verify data using Virgil Security keys...
Definition: VirgilSigner.h:50