4#include "../Foundation/Span.h"
27 static constexpr auto MD5_DIGEST_LENGTH = 16;
28 static constexpr auto SHA1_DIGEST_LENGTH = 20;
29 static constexpr auto SHA256_DIGEST_LENGTH = 32;
72#elif SC_PLATFORM_WINDOWS
76#elif SC_PLATFORM_LINUX
unsigned char uint8_t
Platform independent (1) byte unsigned int.
Definition: PrimitiveTypes.h:36
unsigned long long uint64_t
Platform independent (8) bytes unsigned int.
Definition: PrimitiveTypes.h:42
Compute MD5, SHA1 or SHA256 hash for stream of data.
Definition: Hashing.h:24
Hashing()
Initializes an Hashing struct.
bool add(Span< const uint8_t > data)
Add data to be hashed.
~Hashing()
Destroys an Hashing struct.
bool setType(Type newType)
Set type of hash to compute.
Type
Definition: Hashing.h:37
@ TypeMD5
Compute MD5 hash for the incoming stream of bytes.
Definition: Hashing.h:38
@ TypeSHA1
Compute SHA1 hash for the incoming stream of bytes.
Definition: Hashing.h:39
@ TypeSHA256
Compute SHA256 hash for the incoming stream of bytes.
Definition: Hashing.h:40
bool getHash(Result &res)
Finalizes hash computation that has been pushed through Hashing::update.
View over a contiguous sequence of items (pointer + size in elements).
Definition: Span.h:20