add sha256 implementation

this adds a sha256 implementation. it's imported from freeBSD and is libcrypto api compatible