Update SHA1 code to RFC 6234