PyCrypto ******** PyCrypto est un module permettant de faire de la cryptographie implémentant plusieurs algorithmes et protocole. On peux avoir plus d'information sur l'url https://www.dlitz.net/software/pycrypto/ Son installation est simple et utilise pip ou easy_install :: easy_install pycrypto Cette installation est pourtant difficile sous windows à cause de l'utilisation de librairie native. Il est possible d'avoir une version précompilé sur l'url http://www.voidspace.org.uk/python/modules.shtml#pycrypto Par la suite son utilisation est simple Un exemple d'utilisation de SHA256 .. code-block:: python >>> from Crypto.Hash import SHA256 >>> hash = SHA256.new() >>> hash.update('message') >>> hash.digest() '\xabS\n\x13\xe4Y\x14\x98+y\xf9\xb7\xe3\xfb\xa9\x94\xcf\xd1\xf3\xfb"\xf7\x1c\xea\x1a\xfb\xf0+F\x0cm\x1d' Utilisation d'un module pour crypter un message .. code-block:: python >>> from Crypto.Cipher import AES >>> obj = AES.new('This is a key123', AES.MODE_CBC, 'This is an IV456') >>> message = "The answer is no" >>> ciphertext = obj.encrypt(message) >>> ciphertext '\xd6\x83\x8dd!VT\x92\xaa`A\x05\xe0\x9b\x8b\xf1' >>> obj2 = AES.new('This is a key123', AES.MODE_CBC, 'This is an IV456') >>> obj2.decrypt(ciphertext) 'The answer is no'