cryptopythonrsa
發布時間: 2025-08-21 03:36:29
你可以使用rsa這個python庫:
>>> (bob_pub, bob_priv) = rsa.newkeys(512)
>>> message = 'hello Bob!'
>>> crypto = rsa.encrypt(message, bob_pub)
>>> message = rsa.decrypt(crypto, bob_priv)
>>> print message
hello Bob!
文檔地址:http://stuvel.eu/files/python-rsa-doc/usage.html#generating-keys
如果解決了您的問題請採納!
如果未解決請繼續追問
熱點內容