Exchange sha1 implementation