sha: fix strict aliasing warnings (#7)

Closes issue #7.