pycryptodome

    1熱度

    1回答

    我在使用Python 3上的pycryptodome進行AES-CTR加密時遇到了困難。數據可能是〜1000字節,但是當它變得足夠長時,它會中斷。我不明白這個錯誤應該是什麼意思或如何解決它。 from os import urandom from Crypto.Cipher import AES cipher = AES.new(urandom(16), AES.MODE_CTR, nonc

    1熱度

    1回答

    爲什麼cipher3無法解密密碼數據? cipher2和cipher3使用相同的隨機數,但cipher3無法解密數據 代碼: >>> from Crypto.Cipher import AES >>> cipher = AES.new(b"M"*16, AES.MODE_EAX) >>> cipher2 = AES.new(b"M"*16, AES.MODE_EAX, cipher.nonc

    0熱度

    2回答

    我試圖構建一個使用pycryptodome下面的腳本: # based on this example http://www.codekoala.com/posts/aes-encryption-python-using-pycrypto/#comment-25921785 from Crypto.Cipher import AES from Crypto import Random imp