OtaUpgrade::ChecksumVerifier Class Reference
Checksum verifier used by BasicStream
if signature verification is disabled.
More...
#include <ChecksumVerifier.h>
Inheritance diagram for OtaUpgrade::ChecksumVerifier:
Collaboration diagram for OtaUpgrade::ChecksumVerifier:
Public Types | |
typedef Hash | VerificationData |
Checksum type. More... | |
using | Engine = Engine_ |
using | Hash = ByteArray< Engine::hashsize > |
Public Member Functions | |
bool | verify (const VerificationData &checksum) |
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) |
HashContext & | update (const FSTR::ObjectBase &obj) |
HashContext & | update (const void *data, size_t size) |
template<size_t size_> | |
HashContext & | update (const ByteArray< size_ > &array) |
Detailed Description
Checksum verifier used by BasicStream
if signature verification is disabled.
Wrap Crypto::Md5
such that it provides an interface compatible to SignatureVerifier
.
Member Typedef Documentation
◆ Engine
template<class Engine_ >
|
inherited |
◆ Hash
template<class Engine_ >
|
inherited |
◆ VerificationData
Checksum type.
Member Function Documentation
◆ calculate()
template<class Engine_ >
template<typename... Ts>
|
inlineinherited |
◆ getHash()
template<class Engine_ >
|
inlineinherited |
Finalise and return the final hash value.
- Return values
-
Hash
◆ getState()
template<class Engine_ >
|
inlineinherited |
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>
|
inlineinherited |
Reset the context for a new calculation.
◆ setState()
template<class Engine_ >
|
inlineinherited |
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_ >
|
inlineinherited |
◆ update() [2/4]
template<class Engine_ >
|
inlineinherited |
◆ update() [3/4]
template<class Engine_ >
|
inlineinherited |
◆ update() [4/4]
template<class Engine_ >
template<size_t size_>
|
inlineinherited |
◆ verify()
|
inline |
Verify the given checksum
.
- Returns
true
if checksum matches content,false
otherwise.
The documentation for this class was generated from the following file: