Package Crypto :: Package Cipher :: Module ARC4 :: Class ARC4Cipher
[frames] | no frames]

Class ARC4Cipher

ARC4 cipher object
Instance Methods
 
__init__(self, key, *args, **kwargs)
Initialize an ARC4 cipher object
 
encrypt(self, plaintext)
Encrypt a piece of data.
 
decrypt(self, ciphertext)
Decrypt a piece of data.
Method Details

__init__(self, key, *args, **kwargs)
(Constructor)

 

Initialize an ARC4 cipher object

See also new() at the module level.

encrypt(self, plaintext)

 
Encrypt a piece of data.
Parameters:
  • plaintext (byte string) - The piece of data to encrypt. It can be of any size.
Returns:
the encrypted data (byte string, as long as the plaintext).

decrypt(self, ciphertext)

 
Decrypt a piece of data.
Parameters:
  • ciphertext (byte string) - The piece of data to decrypt. It can be of any size.
Returns:
the decrypted data (byte string, as long as the ciphertext).