Implemented SHA1 encoding.