libcryptosec
Static Public Member Functions | List of all members

Implementa funcionalidades de assinatura assimétrica, bem como a verificação dessa. More...

#include <Signer.h>

Static Public Member Functions

static ByteArray sign (PrivateKey &key, ByteArray &hash, MessageDigest::Algorithm algorithm) throw (SignerException)
 
static bool verify (PublicKey &key, ByteArray &signature, ByteArray &hash, MessageDigest::Algorithm algorithm) throw (SignerException)
 

Detailed Description

Implementa funcionalidades de assinatura assimétrica, bem como a verificação dessa.

Member Function Documentation

◆ sign()

ByteArray Signer::sign ( PrivateKey key,
ByteArray hash,
MessageDigest::Algorithm  algorithm 
)
throw (SignerException
)
static

Realiza assinatura assimétrica.

Parameters
keychave privada.
hashbytes que representam o hash.
algorithmalgoritmo de criptografia assimétrica.
Returns
bytes que representam a assinatura digital.
Exceptions
SignerExceptioncaso o algoritmo solicitado não seja suportado ou caso ocorra algum erro interno durante a cifragem.
See also
PrivateKey
ByteArray
MessageDigest::Algorithm

◆ verify()

bool Signer::verify ( PublicKey key,
ByteArray signature,
ByteArray hash,
MessageDigest::Algorithm  algorithm 
)
throw (SignerException
)
static

Verifica assinatura assimétrica.

Parameters
keychave pública.
signaturebytes que representam a assinatura assimétrica.
hashbytes que representam o hash.
algorithmalgoritmo de criptografia assimétrica.
Returns
true caso a assinatura seja verificada, false caso contrário.
Exceptions
SignerExceptioncaso o algoritmo solicitado não seja suportado ou caso ocorra algum erro interno durante a verificação.
See also
PublicKey
ByteArray
MessageDigest::Algorithm

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