Commit 748282cb authored by Nikos Skalkotos's avatar Nikos Skalkotos
Browse files

Make snf-passtohash.py comply with pep8

parent d1628244
......@@ -34,10 +34,12 @@ from random import choice
from os.path import basename
from optparse import OptionParser
def random_salt(length=8):
pool = ascii_letters + digits + "/" + "."
return ''.join(choice(pool) for i in range(length))
METHOD = {
# Name: (algoritm, options)
'md5': (passlib.hash.md5_crypt, {}),
......@@ -51,6 +53,7 @@ METHOD = {
'sha1': (passlib.hash.sha1_crypt, {})
}
def parse_arguments(input_args):
usage = "usage: %prog [-h] [-m encrypt-method] <password>"
parser = OptionParser(usage=usage)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment