diff --git a/README.md b/README.md index 4e13128..72c6207 100644 --- a/README.md +++ b/README.md @@ -10,42 +10,46 @@ Installation: Restart Arduino to rescan for new libraries. Using SHA-1: - #include "sha1.h" - ... - uint8_t *hash; - Sha1.init(); - Sha1.print("This is a message to hash"); - hash = Sha1.result(); + + #include "sha1.h" + ... + uint8_t *hash; + Sha1.init(); + Sha1.print("This is a message to hash"); + hash = Sha1.result(); The hash result is then stored in hash[0], hash[1] .. hash[19]. Using HMAC-SHA-1: - #include "sha1.h" - ... - uint8_t *hash; - Sha1.initHmac("hash key",8); // key, and length of key in bytes - Sha1.print("This is a message to hash"); - hash = Sha1.resultHmac(); + + #include "sha1.h" + ... + uint8_t *hash; + Sha1.initHmac("hash key",8); // key, and length of key in bytes + Sha1.print("This is a message to hash"); + hash = Sha1.resultHmac(); The hash result is then stored in hash[0], hash[1] .. hash[19]. Using SHA-256: - #include "sha256.h" - ... - uint8_t *hash; - Sha256.init(); - Sha256.print("This is a message to hash"); - hash = Sha256.result(); + + #include "sha256.h" + ... + uint8_t *hash; + Sha256.init(); + Sha256.print("This is a message to hash"); + hash = Sha256.result(); The hash result is then stored in hash[0], hash[1] .. hash[31]. Using HMAC-SHA-256: - #include "sha256.h" - ... - uint8_t *hash; - Sha256.initHmac("hash key",8); // key, and length of key in bytes - Sha256.print("This is a message to hash"); - hash = Sha256.resultHmac(); + + #include "sha256.h" + ... + uint8_t *hash; + Sha256.initHmac("hash key",8); // key, and length of key in bytes + Sha256.print("This is a message to hash"); + hash = Sha256.resultHmac(); The hash result is then stored in hash[0], hash[1] .. hash[31].