Calculate the sha1 hash of a string