Package yawPyCrypto :: Module Cipher :: Class EncryptCipher
[show private | hide private]
[frames | no frames]

Class EncryptCipher

             object --+    
            EncryptBase --+
     object --+           |
              |           |
     StreamBase --+       |
                  |       |
       OutputStream --+   |
                      |   |
     object --+       |   |
              |       |   |
AlgoDefinitions --+   |   |
                  |   |   |
       CipherStream --+   |
                      |   |
          EncryptStream --+

Encryption cipher class. This class is the main entrypoint for all stream encryption which is to be done by yawPyCrypto. It is derived from the underlying encryption stream and encryption interface classes. Interfacing with this class is done by simply calling feed() and finish().
Method Summary
  __init__(self, password, cipher_algo, cipher_mode, IV, hash_algo)
Initialize the encryption cipher.
a new object with type S, a subtype of T __new__(S, ...)

Method Details

__init__(self, password=None, cipher_algo=3, cipher_mode=0, IV=None, hash_algo=5)

Initialize the encryption cipher. The parameters used here are
the following:
    password - Password to use for encrypting the data. This
               string must be of the corrent length for the
               selected cipher algorithm. Special value None means
               to create a session password, which can be
               retrieved using the password property of the
               created instance.
    cipher_algo - One of the CIPHER_* constants, specifying the
                  cipher algorithm to use.
    cipher_mode - One of the MODE_* constants, specifying the
                  cipher block mode to use. Special constant is
                  MODE_NONE, which must be used with stream
                  ciphers, and when used with block ciphers means
                  to use the standard mode of that cipher
    IV - Initialization value for block chaining modes. This must
         be at least as long as the blocksize of the algorithm
         which is used. Special value None means that the default
         IV, declared in _Imports, is used. It is actually not
         necessary, nor safer to pass a custom IV, as the first
         block of data written for block ciphers is always a
         random block of data, which seeds the IV to a default
         value for the actual data. IV is only used on block
    hash_algo - One of the HASH_* constants, specifying the hash
                algorithm to use for the stream signature.
All arguments have safe defaults, thus it is safe just to
instantiate this class.

__new__(S, ...)

a new object with type S, a subtype of T

Generated by Epydoc 1.1 on Sun Aug 17 03:32:31 2003