Crypto::HashContext< Engine_ > Class Template Reference
Class template for a Hash implementation 'Context'. More...
#include <HashContext.h>
Inheritance diagram for Crypto::HashContext< Engine_ >:
Classes | |
struct | State |
Public Types | |
using | Engine = Engine_ |
using | Hash = ByteArray< Engine::hashsize > |
Public Member Functions | |
template<typename... EngineArgs> | |
HashContext (EngineArgs &&... engineArgs) | |
template<typename... EngineArgs> | |
HashContext & | reset (EngineArgs &&... engineArgs) |
Reset the context for a new calculation. More... | |
template<typename... Ts> | |
Hash | calculate (Ts &&... args) |
Calculate hash on some data. More... | |
Hash | getHash () |
Finalise and return the final hash value. More... | |
State | getState () |
Get intermediate hash state. More... | |
void | setState (const State &state) |
Restore intermediate hash state. More... | |
Update hash over a given block of data | |
HashContext & | update (const Blob &blob) |
Data from Blob. More... | |
HashContext & | update (const FSTR::ObjectBase &obj) |
Data from flash object. More... | |
HashContext & | update (const void *data, size_t size) |
Pointer to data + size. More... | |
template<size_t size_> | |
HashContext & | update (const ByteArray< size_ > &array) |
Data in ByteArray. More... | |
Detailed Description
template<class Engine_>
class Crypto::HashContext< Engine_ >
Class template for a Hash implementation 'Context'.
- Template Parameters
-
Engine The HashEngine implementation
Member Typedef Documentation
◆ Engine
template<class Engine_ >
using Crypto::HashContext< Engine_ >::Engine = Engine_ |
◆ Hash
template<class Engine_ >
using Crypto::HashContext< Engine_ >::Hash = ByteArray<Engine::hashsize> |
Constructor & Destructor Documentation
◆ HashContext()
template<class Engine_ >
template<typename... EngineArgs>
|
inline |
Member Function Documentation
◆ calculate()
template<class Engine_ >
template<typename... Ts>
|
inline |
◆ getHash()
template<class Engine_ >
|
inline |
Finalise and return the final hash value.
- Return values
-
Hash
◆ getState()
template<class Engine_ >
|
inline |
Get intermediate hash state.
- Parameters
-
state OUT: current state
- Return values
-
uint64_t Number of bytes processed so far
- Note
- This method is only required for core hashes, used by Bear SSL
◆ reset()
template<class Engine_ >
template<typename... EngineArgs>
|
inline |
Reset the context for a new calculation.
◆ setState()
template<class Engine_ >
|
inline |
Restore intermediate hash state.
Parameter values obtained via previous getState() call
- Parameters
-
state count
- Note
- This method is only required for core hashes, used by Bear SSL
◆ update() [1/4]
template<class Engine_ >
|
inline |
Data from Blob.
◆ update() [2/4]
template<class Engine_ >
template<size_t size_>
|
inline |
Data in ByteArray.
◆ update() [3/4]
template<class Engine_ >
|
inline |
Data from flash object.
◆ update() [4/4]
template<class Engine_ >
|
inline |
Pointer to data + size.
- Parameters
-
data Data block size Length of data in bytes
The documentation for this class was generated from the following file: