Virgil Security Crypto library  2.0.7
Public Member Functions | List of all members
virgil::crypto::VirgilSigner Class Reference

This class provides high-level interface to sign and verify data using Virgil Security keys. More...

#include <VirgilSigner.h>

Public Member Functions

 VirgilSigner (foundation::VirgilHash::Algorithm hashAlgorithm=foundation::VirgilHash::Algorithm::SHA384)
 Create signer with predefined hash function. More...
 
VirgilByteArray sign (const VirgilByteArray &data, const VirgilByteArray &privateKey, const VirgilByteArray &privateKeyPassword=VirgilByteArray())
 Sign data with given private key. More...
 
bool verify (const VirgilByteArray &data, const VirgilByteArray &sign, const VirgilByteArray &publicKey)
 Verify sign and data to be conformed to the given public key. More...
 

Detailed Description

This class provides high-level interface to sign and verify data using Virgil Security keys.

This module can sign / verify as raw data and Virgil Security tickets.

Constructor & Destructor Documentation

virgil::crypto::VirgilSigner::VirgilSigner ( foundation::VirgilHash::Algorithm  hashAlgorithm = foundation::VirgilHash::Algorithm::SHA384)
explicit

Create signer with predefined hash function.

Note
Specified hash function algorithm is used only during signing.

Member Function Documentation

VirgilByteArray virgil::crypto::VirgilSigner::sign ( const VirgilByteArray data,
const VirgilByteArray privateKey,
const VirgilByteArray privateKeyPassword = VirgilByteArray() 
)

Sign data with given private key.

Returns
Virgil Security sign.
bool virgil::crypto::VirgilSigner::verify ( const VirgilByteArray data,
const VirgilByteArray sign,
const VirgilByteArray publicKey 
)

Verify sign and data to be conformed to the given public key.

Returns
true if sign is valid and data was not malformed.

The documentation for this class was generated from the following file: