Changes between Version 7 and Version 8 of AdminApplication


Ignore:
Timestamp:
12/27/2009 01:28:53 AM (5 years ago)
Author:
bugmenot
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • AdminApplication

    v7 v8  
    1010
    1111{{{
    12 import sha, random, sys
     12import hashlib, random, sys
    1313try:
    1414    raw_password = sys.argv[1]
     
    1717    sys.exit()
    1818algo = 'sha1'
    19 salt = sha.new(str(random.random())).hexdigest()[:5]
    20 hsh = sha.new(salt+raw_password).hexdigest()
     19salt = hashlib.sha1(str(random.random())).hexdigest()[:5]
     20hsh = hashlib.sha1(salt+raw_password).hexdigest()
    2121print "%s$%s$%s" % (algo, salt, hsh)
    2222}}}
Back to Top