Cryptography is cool, but it is hard. I have added the method runHash() because I hope this is a user-friendly way to calculate a hash value. The user needs just to allocate memory for the output, give the input to runHash() and the method returns the output.
How to use
SHA256
runHash()
Giving the input text, this method returns the SHA256 hash.
Sintax
SHA256.runHash(input, inputLength, output);
Parameters
input: the plain text. The variable type is uint8_t;
inputLength: the plain text's length. The variable type is size_t;
output: the SHA256 hash. It is always 32 bytes long. The variable type is size_t;
Cryptography is cool, but it is hard. I have added the method
runHash()
because I hope this is a user-friendly way to calculate a hash value. The user needs just to allocate memory for the output, give the input torunHash()
and the method returns the output.How to use
SHA256
runHash()
Giving the input text, this method returns the SHA256 hash.
Sintax
SHA256.runHash(input, inputLength, output);
Parameters
uint8_t
;size_t
;size_t
;Example
(similar for MD5 and SHA1)