Título: Instalar pycrypto en ubuntu 14 Publicado por: maria13 en 2 Mayo 2018, 09:45 am Hola,
Me gustaría poder cifrar el contenido de un archivo con python. He buscado información i he instalado pycryto: He seguido estos pasos: For Python 3.x: $ sudo apt-get install build-essential libgmp3-dev python3-dev $ pip install pycryptodomex $ python3 -m Cryptodome.SelfTest Todo ha ido bien, lo que sucede es que cuando ejecute el siguiente programa: from Crypto.Cipher import AES from Crypto.Random import get_random_bytes key = get_random_bytes(16) cipher = AES.new(key, AES.MODE_EAX) ciphertext, tag = cipher.encrypt_and_digest(data) file_out = open("encrypted.bin", "wb") [ file_out.write(x) for x in (cipher.nonce, tag, ciphertext) ] Me da el error: from Crypto.Cipher import AES ImportError: No module named 'Crypto' Alguien me puede ayudar? Toda la inforación la he sacado de la web: http://pycryptodome.readthedocs.io/en/latest/src/installation.html#compiling-in-linux-ubuntu Gracias de antemano. Maria Título: Re: Instalar pycrypto en ubuntu 14 Publicado por: aangrymasther en 2 Mayo 2018, 11:36 am No estoy muy seguro pero creo que el "pip" es para python2. Para python3 utiliza pip3.
|