コード例 #1
0
 def private_pem(self):
     """Returns: bytes"""
     rsa = RSA.construct(
         (magicsigs.base64_to_long(str(self.mod)),
          magicsigs.base64_to_long(str(self.public_exponent)),
          magicsigs.base64_to_long(str(self.private_exponent))))
     return rsa.exportKey(format='PEM')
コード例 #2
0
 def public_pem(self):
     rsa = RSA.construct(
         (magicsigs.base64_to_long(str(self.mod)),
          magicsigs.base64_to_long(str(self.public_exponent))))
     return rsa.exportKey(format='PEM')