split-secret/scripts/main.py

20 lines
779 B
Python
Raw Normal View History

2022-12-09 12:03:45 +01:00
import argparse
from classes.Generate import Generate
from classes.Cleanup import Cleanup
2022-12-09 12:03:45 +01:00
if __name__ == '__main__':
parser = argparse.ArgumentParser()
2022-12-09 13:22:57 +01:00
parser.add_argument('--mode',type=str, dest='mode',required=True,choices=['cleanup','generate'])
parser.add_argument('--amount',type=int, dest='amount_of_secret_holders',required=False,choices=range(1,9))
parser.add_argument('--quota', type=int, dest='decryption_quota', choices=range(1,101),required=False)
2022-12-09 12:03:45 +01:00
args = parser.parse_args()
if args.mode == 'cleanup':
cleanup = Cleanup()
2022-12-09 13:22:57 +01:00
cleanup.deleteAll()
exit()
if args.mode == 'generate':
generate = Generate(args.amount_of_secret_holders, args.decryption_quota)
generate.execute()
exit()