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

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

#include <VirgilStreamSigner.h>

Public Member Functions

 VirgilStreamSigner (const virgil::crypto::foundation::VirgilHash &hash=virgil::crypto::foundation::VirgilHash::sha384())
 Create signer with predefined hash function. More...
 
VirgilByteArray sign (VirgilDataSource &source, const VirgilByteArray &privateKey, const VirgilByteArray &privateKeyPassword=VirgilByteArray())
 Sign data provided by the source with given private key. More...
 
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. More...
 

Detailed Description

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

This module can sign / verify data provided by stream.

Constructor & Destructor Documentation

virgil::crypto::VirgilStreamSigner::VirgilStreamSigner ( const virgil::crypto::foundation::VirgilHash hash = virgil::crypto::foundation::VirgilHash::sha384())
explicit

Create signer with predefined hash function.

Note
Specified hash function algorithm is used only during signing.

Member Function Documentation

VirgilByteArray virgil::crypto::VirgilStreamSigner::sign ( VirgilDataSource source,
const VirgilByteArray &  privateKey,
const VirgilByteArray &  privateKeyPassword = VirgilByteArray() 
)

Sign data provided by the source with given private key.

Returns
Virgil Security sign.
bool virgil::crypto::VirgilStreamSigner::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.

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

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