user56157: 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!!

user66706: 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.

user30198: 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.

56157: <p>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: <a href="https://github.com/Cathedrow/Cryptosuite/blob/master/Sha/examples/hmacsha256test/hmacsha256test.pde" rel="nofollow noreferrer">https://github.com/Cathedrow/Cryptosuite/blob/master/Sha/examples/hmacsha256test/hmacsha256test.pde</a></p>

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

<p>Can any one point me to the right direction? Thanks a lot!!</p>
 66706: <p>I have used the <a href="https://github.com/Cathedrow/Cryptosuite/" rel="nofollow noreferrer">https://github.com/Cathedrow/Cryptosuite/</a> on ESP8266. For that in addition to the changes desribed by Jot it is enough to remove </p>

<pre><code>#include &lt;avr/io.h&gt;
#include &lt;avr/pgmspace.h&gt;
</code></pre>

<p>from the header files. Then it is working fine.</p>
 30198: <p>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.</p>

<p>I have tested the first link that you gave to <a href="https://github.com/Cathedrow/Cryptosuite/blob/master/Sha/examples/hmacsha256test/hmacsha256test.pde" rel="nofollow noreferrer">Cryptosuite</a>. It is outdated and needs to be fixed.<br>
I renamed "hmacsha256test.<strong>pde</strong>" to "hmacsha256test.<strong>ino</strong>".<br>
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.</p>

<p>The <code>PROGMEM</code> requires that the 'const' keyword is used. For example in "sha256.cpp":</p>

<pre><code>const uint32_t sha256K[] PROGMEM = {
</code></pre>

<p>The 'write' function should return a <code>size_t</code> value.</p>

<p>In sha256.h:</p>

<pre><code>// virtual void write(uint8_t);
virtual size_t write(uint8_t);
</code></pre>

<p>In sha256.cpp:</p>

<pre><code>size_t Sha256Class::write(uint8_t data) {
  ++byteCount;
  addUncounted(data);
  return 1;
}
</code></pre>

<p>Then it compiles and runs on a Arduino Uno, although there is a warning for low memory because 75% of the sram is used.</p>

<p>The <a href="https://github.com/simonratner/Arduino-SHA-256" rel="nofollow noreferrer">second link</a> is a changed version of the same Cryptosuite. It should be able to use the examples of the Cryptosuite, but it does not.<br>
I can make that work as well.</p>

<p>Using the same example of the Cryptosuite "hmacsha256test.<strong>pde</strong>" (I renamed it to "hmacsha256test.<strong>ino</strong>"), create a object 'sha' after including the "sha256.h":</p>

<pre><code>#include "sha256.h"
Sha256 sha;
</code></pre>

<p>In the example, replace all "Sha256" function calls with "sha" function calls:</p>

<pre><code>sha.initHmac(hmacKey1,20);
sha.print("Hi There");
</code></pre>

<p>Then it works as well.</p>
