示例#1
0
def list_for_smt_lib():
    l = [(smt.hex_to_int(item[HASH_OF_USERNAME]), item[PK_AS_INT]) \
         for item in data.values()]
    return l
示例#2
0
def add_username_to_data(user, hex_pk):
    # TODO save offline
    d = {USERNAME: user,
         HASH_OF_USERNAME: smt.Hash(user),
         PK_AS_INT: smt.hex_to_int(hex_pk)}
    data[user] = d