azure-core
Public Member Functions | Protected Member Functions | List of all members
Azure::Core::Cryptography::Hash Class Referenceabstract

Represents the base class for hash algorithms which map binary data of an arbitrary length to small binary data of a fixed length.

#include <hash.hpp>

Inheritance diagram for Azure::Core::Cryptography::Hash:
Azure::Core::Cryptography::Md5Hash

Public Member Functions

void Append (const uint8_t *data, size_t length)
 Used to append partial binary input data to compute the hash in a streaming fashion. More...
 
std::vector< uint8_t > Final (const uint8_t *data, size_t length)
 Computes the hash value of the specified binary input data, including any previously appended. More...
 
std::vector< uint8_t > Final ()
 Computes the hash value of all the binary input data appended to the instance so far. More...
 
virtual ~Hash ()=default
 Destructs Hash. More...
 

Protected Member Functions

 Hash ()=default
 Constructs a default instance of Hash. More...
 

Constructor & Destructor Documentation

◆ Hash()

Azure::Core::Cryptography::Hash::Hash ( )
protecteddefault

◆ ~Hash()

virtual Azure::Core::Cryptography::Hash::~Hash ( )
virtualdefault

Member Function Documentation

◆ Append()

void Azure::Core::Cryptography::Hash::Append ( const uint8_t *  data,
size_t  length 
)
inline
Remarks
Once all the data has been added, call Azure::Core::Cryptography::Hash::Final() to get the computed hash value.
Do not call this function after a call to Azure::Core::Cryptography::Hash::Final().
Parameters
dataThe pointer to the current block of binary data that is used for hash calculation.
lengthThe size of the data provided.

◆ Final() [1/2]

std::vector<uint8_t> Azure::Core::Cryptography::Hash::Final ( )
inline
Remarks
Use Azure::Core::Cryptography::Hash::Append() to add more partial data before calling this function.
Do not call this function multiple times.
Returns
The computed hash value corresponding to the input provided.

◆ Final() [2/2]

std::vector<uint8_t> Azure::Core::Cryptography::Hash::Final ( const uint8_t *  data,
size_t  length 
)
inline
Remarks
Do not call this function multiple times.
Parameters
dataThe pointer to the last block of binary data to compute the hash value for.
lengthThe size of the data provided.
Returns
The computed hash value corresponding to the input provided, including any previously appended.

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