10Duke Enterprise C++ SDK
Loading...
Searching...
No Matches
tenduke::crypto::win::cng::WinCNGHash Class Reference

#include <WinCNGHash.h>

Detailed Description

WINCNG implementation of cryptographic hash (e.g.

SHA256).

Inheritance diagram for tenduke::crypto::win::cng::WinCNGHash:
tenduke::crypto::CryptographicHash tenduke::crypto::MessageDigest

Public Member Functions

 WinCNGHash (::BCRYPT_ALG_HANDLE algorithm)
 Constructs a 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.

Member Function Documentation

◆ digest()

std::unique_ptr<::BinaryData > tenduke::crypto::win::cng::WinCNGHash::digest ( )
overridevirtual

Computes the digest.

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

Implements tenduke::crypto::MessageDigest.

◆ digestTo()

void tenduke::crypto::win::cng::WinCNGHash::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::win::cng::WinCNGHash::length ( ) const
overridevirtual

Returns length (in bytes) of the resulting digest.

Returns
-

Implements tenduke::crypto::MessageDigest.

◆ update()

xdcrypto::MessageDigest * tenduke::crypto::win::cng::WinCNGHash::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/windows/src/crypto/msgauthn/WinCNGHash.h
  • core/services/windows/src/crypto/msgauthn/WinCNGHash.cpp