use hashlib for sha1 generation