Skip to content

Instantly share code, notes, and snippets.

@RayOnFire
Created June 5, 2018 06:42
Show Gist options
  • Select an option

  • Save RayOnFire/9b29866d2a1958dab53d33e27e44f4d1 to your computer and use it in GitHub Desktop.

Select an option

Save RayOnFire/9b29866d2a1958dab53d33e27e44f4d1 to your computer and use it in GitHub Desktop.
[Python SHA1]Python SHA1用法 #Python
import hashlib
salt = "some_salt"
sha1 = hashlib.sha1()
sha1.update(bytes('test' + salt, 'utf8'))
print(sha1.hexdigest())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment