Generating unique sha1 code