Skip to content

Instantly share code, notes, and snippets.

@magnusdahlstrand
Created May 16, 2012 16:02
Show Gist options
  • Save magnusdahlstrand/2711640 to your computer and use it in GitHub Desktop.
Save magnusdahlstrand/2711640 to your computer and use it in GitHub Desktop.
Different implementations of a nonce generator
from random import random
from hashlib import md5
generate_nonce = lambda: md5(str(random())).hexdigest()
# How to:
# 1. Call the generate_nonce function:
print generate_nonce()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment