Question: I am doing a school project and wanted to implement HMAC on a arduino UNO like board. I have been testing the Cryptosuite, but none of the examples work for me. Such as this one: <https://github.com/Cathedrow/Cryptosuite/blob/master/Sha/examples/hmacsha256test/hmacsha256test.pde>

This one <https://github.com/simonratner/Arduino-SHA-256>, a trimmed-down version, which sounds good but there's none working example. 

Can any one point me to the right direction? Thanks a lot!!

Answer: 
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](https://github.com/Cathedrow/Cryptosuite/blob/master/Sha/examples/hmacsha256test/hmacsha256test.pde). 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](https://github.com/simonratner/Arduino-SHA-256) 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.
I have used the <https://github.com/Cathedrow/Cryptosuite/> on ESP8266. For that in addition to the changes desribed by Jot it is enough to remove 

```
#include <avr/io.h>
#include <avr/pgmspace.h>

```

from the header files. Then it is working fine.