add sha256 implementation
Eliminate multiline macros, embrace C99