Generate SHA1 hash from string