apppublic/test/create_private_file.py
2023-02-23 15:17:24 +08:00

15 lines
281 B
Python
Executable File

import sys
from appPublic.rsawrap import RSA
def gen(filename):
rsa = RSA()
pk = rsa.create_privatekey()
rsa.write_privatekey(pk, filename)
if __name__ == '__main__':
if len(sys.argv) < 2:
print('Usage\n%s private_file_name' % sys.argv[0])
sys.exit(1)
gen(sys.argv[1])