MCPcopy
hub / github.com/ticarpi/jwt_tool / getRSAKeyPair

Function getRSAKeyPair

jwt_tool.py:707–714  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

705 return cracked
706
707def getRSAKeyPair():
708 #config['crypto']['pubkey'] = config['crypto']['pubkey']
709 privkey = config['crypto']['privkey']
710 cprintc("key: "+privkey, "cyan")
711 privKey = RSA.importKey(open(privkey).read())
712 pubKey = privKey.publickey().exportKey("PEM")
713 #config['crypto']['pubkey'] = RSA.importKey(config['crypto']['pubkey'])
714 return pubKey, privKey
715
716def newRSAKeyPair():
717 new_key = RSA.generate(2048, e=65537)

Callers 1

jwksEmbedFunction · 0.85

Calls 1

cprintcFunction · 0.85

Tested by

no test coverage detected