Storing hash values from SHA256 I am using this code and I can not save the output of the hash function to an array of char. Can you help me how to do that?    

#include "sha256.h"
#include &lt;Arduino.h&gt;
#include "./printf.h"

void printHash(uint8_t* hash) {
  int i;
  for (i=0; i&lt;32; i++) {
    Serial.print("0123456789abcdef"[hash[i]&gt;&gt;4]);
    Serial.print("0123456789abcdef"[hash[i]&amp;0xf]);
  }
  Serial.println();
}

void setup()
{ String FinalStr="1234567890";
Sha256.init();
  Sha256.print(FinalStr);
  printHash(Sha256.result());
}
void loop()
{


}
This is the code that worked for me:

#include "sha256.h"
void setup(void)
{char encoded[64];
    Serial.begin(9600);

    // this is actually the RFC4231 4.3 test

    Sha256.init();
    Sha256.print("123");
    uint8_t * result = Sha256.result();

    Serial.println("Expect: 2d711642b726b04401627ca9fbac32f5c8530fb1903cc4db02258717921a4881");
    Serial.print(  "Got   : ");
    for (int i = 0; i &lt; 32; i++) {
            Serial.print("0123456789abcdef"[result[i] &gt;&gt; 4]);
            Serial.print("0123456789abcdef"[result[i] &amp; 0xf]);

            for(int i = 0; i &lt; 64; i+=2)
                {
                  encoded[i] = "0123456789abcdef"[result[i / 2] &gt;&gt; 4];
                  encoded[i + 1] = "0123456789abcdef"[result[i / 2] &amp; 0xf];
                }
    }
    Serial.print("\n");
            for(int z = 0; z &lt; 64; z++)
            Serial.print(encoded[z]);
}

void loop(void)
{}