示例#1
0
文件: main.py 项目: crazytan/seclogin
def initialize():
    config.init_random()
    config.generate_prime()
    config.generate_h_pwd()
    poly.generate_poly()
    if __debug__:
        pwd = reader.init("input.txt")
    else:
        pwd = reader.init(raw_input("enter the input file: "))
    table.generate(pwd, None)
    history.init()
示例#2
0
文件: main.py 项目: crazytan/seclogin
def update(pwd, feature):
    config.generate_h_pwd()  # generate the new h_pwd
    stat = history.add_feature(feature)  # add the new feature to history file and save it
    poly.generate_poly()  # generate the new polynomial
    table.generate(pwd, stat)  # generate the new table