Port sha code from avr/playground to arduino/playground.