parent
96d9dc736a
commit
9af2bd77d3
@ -0,0 +1,8 @@
|
|||||||
|
import rsa
|
||||||
|
def server_twokey():
|
||||||
|
pubkey, privkey = rsa.newkeys(1024)
|
||||||
|
pub = pubkey.save_pkcs1()
|
||||||
|
pri = privkey.save_pkcs1("PEM")
|
||||||
|
with open("./Bpubkey.pem", mode="wb") as f, open("./Bprivkey.pem", mode="wb") as f1:
|
||||||
|
f.write(pub)
|
||||||
|
f1.write(pri)
|
Loading…
Reference in new issue