2021-07-13 16:13:59 +08:00
|
|
|
import sys
|
2022-06-28 20:06:59 +08:00
|
|
|
from appPublic.rsawrap import RSA
|
2021-07-13 16:13:59 +08:00
|
|
|
|
|
|
|
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])
|