| Server IP : 118.27.122.120 / Your IP : 216.73.216.239 Web Server : Apache System : Linux web0216.sh.tyo1 4.18.0-553.141.2.lve.el7h.x86_64 #1 SMP Wed Jul 8 17:20:31 UTC 2026 x86_64 User : r4834334 ( 11094) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /proc/self/root/proc/thread-self/root/usr/lib64/python2.7/site-packages/M2Crypto/PGP/ |
Upload File : |
"""M2Crypto PGP2 RSA.
Copyright (c) 1999-2003 Ng Pheng Siong. All rights reserved."""
import sys
from M2Crypto import m2, RSA
_RSA = RSA
del RSA
class RSA(_RSA.RSA):
pass
class RSA_pub(_RSA.RSA_pub):
pass
def new_pub_key((e, n)):
"""
Factory function that instantiates an RSA_pub object from a (e, n) tuple.
'e' is the RSA public exponent; it is a string in OpenSSL's binary format,
i.e., a number of bytes in big-endian.
'n' is the RSA composite of primes; it is a string in OpenSSL's binary format,
i.e., a number of bytes in big-endian.
"""
import warnings
warnings.warn('Deprecated. No maintainer for PGP. If you use this, please inform M2Crypto maintainer.', DeprecationWarning)
rsa = m2.rsa_new()
m2.rsa_set_e_bin(rsa, e)
m2.rsa_set_n_bin(rsa, n)
return RSA_pub(rsa, 1)