ChecksumVerifier.h
Go to the documentation of this file.
1 /****
2  * Sming Framework Project - Open Source framework for high efficiency native ESP8266 development.
3  * Created 2017 by Slavey Karadzhov
4  * http://github.com/SmingHub/Sming
5  * All files of the Sming Core are provided under the LGPL v3 license.
6  *
7  * ChecksumVerifier.h
8  *
9  ****/
10 
11 #pragma once
12 
13 #include <Crypto/Md5.h>
14 
15 namespace OtaUpgrade
16 {
23 {
24 public:
26 
30  bool verify(const VerificationData& checksum)
31  {
32  return (getHash() == checksum);
33  }
34 };
35 
36 } // namespace OtaUpgrade
Class template for a Hash implementation 'Context'.
Definition: HashContext.h:23
ByteArray< Engine::hashsize > Hash
Definition: HashContext.h:26
Hash getHash()
Finalise and return the final hash value.
Definition: HashContext.h:104
Checksum verifier used by BasicStream if signature verification is disabled.
Definition: ChecksumVerifier.h:23
Hash VerificationData
Checksum type.
Definition: ChecksumVerifier.h:25
bool verify(const VerificationData &checksum)
Definition: ChecksumVerifier.h:30
Definition: BasicStream.h:24