Skip to content

Instantly share code, notes, and snippets.

@Natim
Created March 17, 2014 08:52
Show Gist options
  • Save Natim/9595956 to your computer and use it in GitHub Desktop.
Save Natim/9595956 to your computer and use it in GitHub Desktop.
UUID from text
import hashlib
import sys
from uuid import UUID
text = sys.stdin.read()
print UUID(hashlib.sha256(text).hexdigest()[:32])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment