Skip to content

Instantly share code, notes, and snippets.

@rm--
Last active November 8, 2021 15:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rm--/0320e1ca5c5f42d01d5a3156cceeb30f to your computer and use it in GitHub Desktop.
Save rm--/0320e1ca5c5f42d01d5a3156cceeb30f to your computer and use it in GitHub Desktop.
sha512 digest to int
import hashlib
h = hashlib.sha512()
h.update('input'.encode('utf-8'))
int(h.hexdigest()[0:8], base=16)
3698158640
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment