rewrote sha2 and sha3