您好,我需要使用模数和指数 + 输入使用 RSA 对文本进行编码
我已经尝试过了,但出现错误
rsa_modulus = data['publickey_mod']
rsa_exponent = data['publickey_exp']
rsa_timestamp = data['timestamp']
rsa_publickey = rsa.PublicKey(rsa_modulus, rsa_exponent)
encrypted = rsa.encrypt(password,rsa_publickey)
print(encrypted)
AttributeError:“str”对象没有属性“bit_length”