ó õùPc@sQdZdZddlmZdd d„ƒYZd„ZdZedd ƒZd S( sðXOR toy cipher XOR is one the simplest stream ciphers. Encryption and decryption are performed by XOR-ing data with a keystream made by contatenating the key. Do not use it for real applications! :undocumented: __revision__, __package__ s$Id$iÿÿÿÿ(t_XORt XORCiphercBs)eZdZd„Zd„Zd„ZRS(sXOR cipher objectcOs:tj|||Ž|_|jj|_|jj|_dS(sUInitialize a XOR cipher object See also `new()` at the module level.N(Rtnewt_ciphert block_sizetkey_size(tselftkeytargstkwargs((s,..\python\site-packages\Crypto\Cipher\XOR.pyt__init__(scCs|jj|ƒS(sñEncrypt a piece of data. :Parameters: plaintext : byte string The piece of data to encrypt. It can be of any size. :Return: the encrypted data (byte string, as long as the plaintext). (Rtencrypt(Rt plaintext((s,..\python\site-packages\Crypto\Cipher\XOR.pyR 0s cCs|jj|ƒS(sóDecrypt a piece of data. :Parameters: ciphertext : byte string The piece of data to decrypt. It can be of any size. :Return: the decrypted data (byte string, as long as the ciphertext). (Rtdecrypt(Rt ciphertext((s,..\python\site-packages\Crypto\Cipher\XOR.pyR ;s (t__name__t __module__t__doc__R R R (((s,..\python\site-packages\Crypto\Cipher\XOR.pyR%s  cOst|||ŽS(sÑCreate a new XOR cipher :Parameters: key : byte string The secret key to use in the symmetric cipher. Its length may vary from 1 to 32 bytes. :Return: an `XORCipher` object (R(RRR ((s,..\python\site-packages\Crypto\Cipher\XOR.pyRFs ii N(i!( Rt __revision__t Crypto.CipherRRRRtxrangeR(((s,..\python\site-packages\Crypto\Cipher\XOR.pyts !