import rsa
def get_encrypted_pw(self,password,nonce,servertime,pub_key):
rsa_e = 65537 #0x10001
pw_string = str(servertime) + '\t' + str(nonce) + '\n' + str(password)
key = rsa.PublicKey(int(pub_key, 16), rsa_e)
pw_encypted = rsa.encrypt(pw_string, key)
passwd = binascii.b2a_hex(pw_encypted)
return passwd
求解如何翻译成php,谢谢!(查了php手册的openssl_public_encrypt但不知道怎么设置py的rsa_e参数)
参见 http://download.csdn.net/down...