10Duke Enterprise C++ SDK
Loading...
Searching...
No Matches
LibcryptoHash Class Reference

#include <LibcryptoHash.h>

Detailed Description

Libcrypto-implementation of tenduke::crypto::MessageDigest.

Inheritance diagram for LibcryptoHash:
tenduke::crypto::CryptographicHash tenduke::crypto::MessageDigest

Public Member Functions

 LibcryptoHash (const char *algorithmName)
 Constructs new instance.
std::size_t length () const override
 Returns length (in bytes) of the resulting digest.
MessageDigestupdate (const unsigned char *message, std::size_t messageLength) override
 Updates the digest.
void digestTo (unsigned char *digest) override
 Computes the digest to pre-allocated buffer.
std::unique_ptr< tenduke::utl::BinaryDatadigest () override
 Computes the digest.

Protected Member Functions

 LibcryptoHash (const char *algorithmName, const EVP_MD *digest)
 Constructs new instance.

Constructor & Destructor Documentation

◆ LibcryptoHash() [1/2]

tenduke::crypto::libcrypto::LibcryptoHash::LibcryptoHash ( const char * algorithmName)
explicit

Constructs new instance.

Parameters
algorithmName-

◆ LibcryptoHash() [2/2]

tenduke::crypto::libcrypto::LibcryptoHash::LibcryptoHash ( const char * algorithmName,
const EVP_MD * digest )
protected

Constructs new instance.

Parameters
algorithmName-
digest-

Member Function Documentation

◆ digest()

Computes the digest.

Returns
data-object containing the digest
Exceptions
tenduke::crypto::CryptoExceptionon error

Implements tenduke::crypto::MessageDigest.

◆ digestTo()

void tenduke::crypto::libcrypto::LibcryptoHash::digestTo ( unsigned char * messageDigest)
overridevirtual

Computes the digest to pre-allocated buffer.

Parameters
messageDigestthe computed digest is placed here (needs to proper size, use MessageDigest::length()).
Exceptions
tenduke::crypto::CryptoExceptionon error

Implements tenduke::crypto::MessageDigest.

◆ length()

size_t tenduke::crypto::libcrypto::LibcryptoHash::length ( ) const
overridevirtual

Returns length (in bytes) of the resulting digest.

Returns
-

Implements tenduke::crypto::MessageDigest.

◆ update()

xdcrypto::MessageDigest * tenduke::crypto::libcrypto::LibcryptoHash::update ( const unsigned char * message,
std::size_t messageLength )
overridevirtual

Updates the digest.

Parameters
message-
messageLength-
Returns
this instance for chaining
Exceptions
tenduke::crypto::CryptoExceptionon error

Implements tenduke::crypto::MessageDigest.


The documentation for this class was generated from the following files:
  • core/services/default/src/crypto/msgauthn/LibcryptoHash.h
  • core/services/default/src/crypto/msgauthn/LibcryptoHash.cpp