Created
July 23, 2012 07:52
-
-
Save PyYoshi/3162470 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # coding: utf-8 | |
| # http://d.hatena.ne.jp/odz/20070821/1187682903 | |
| import string | |
| import random | |
| alphabets = string.digits + string.letters + "!#$%&()*+,-./:;<=>?@[]^_{|}~" | |
| def randstr(n): | |
| return ''.join(random.choice(alphabets) for i in xrange(n)) | |
| if __name__ in '__main__': | |
| print 'salt:',randstr(64) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment