37,720
社区成员
发帖
与我相关
我的任务
分享
In [5]: from rsa import key,common
In [6]: (pub_key, priv_key) = key.newkeys(256)
In [7]: pub_key
Out[7]: PublicKey(67672652858101578917600937273099418597550947430053367645121064592200804506179, 65537)
In [8]: type(pub_key)
Out[8]: rsa.key.PublicKey
In [9]: ??rsa.key.PublicKey
Init signature: rsa.key.PublicKey(self, n, e)
Source:
class PublicKey(AbstractKey):
"""Represents a public RSA key.
This key is also known as the 'encryption key'. It contains the 'n' and 'e'
values.
Supports attributes as well as dictionary-like access. Attribute accesss is
faster, though.