When you are asking a question, here or on a forum, then please tell what you did and what the result was. When you say that it is not working, then we have not enough information and your question might not get answered.
I have tested the first link that you gave to Cryptosuite. It is outdated and needs to be fixed.
I renamed "hmacsha256test.pde" to "hmacsha256test.ino".
The compiler errors and warnings are in the lower part of the Arduino IDE. Scroll up to find the first problem and fix that. Repeat it until it works.
The PROGMEM
requires that the 'const' keyword is used. For example in "sha256.cpp":
const uint32_t sha256K[] PROGMEM = {
The 'write' function should return a size_t
value.
In sha256.h:
// virtual void write(uint8_t);
virtual size_t write(uint8_t);
In sha256.cpp:
size_t Sha256Class::write(uint8_t data) {
++byteCount;
addUncounted(data);
return 1;
}
Then it compiles and runs on a Arduino Uno, although there is a warning for low memory because 75% of the sram is used.
The second link is a changed version of the same Cryptosuite. It should be able to use the examples of the Cryptosuite, but it does not.
I can make that work as well.
Using the same example of the Cryptosuite "hmacsha256test.pde" (I renamed it to "hmacsha256test.ino"), create a object 'sha' after including the "sha256.h":
#include "sha256.h"
Sha256 sha;
In the example, replace all "Sha256" function calls with "sha" function calls:
sha.initHmac(hmacKey1,20);
sha.print("Hi There");
Then it works as well.