Package yawPyCrypto :: Module _CipherStream :: Class EncryptStream
[show private | hide private]
[frames | no frames]

Class EncryptStream

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

Known Subclasses:
EncryptCipher, ZipEncryptStream, KeyEncryptCipher

This class implements an encryption stream. An encryption stream offers support for encrypting variable length packets by keeping an internal buffer for incomplete packets. This class should never be instantiated directly.
Method Summary
  __init__(self)
Initialize the encryption stream by creating the encryption buffer which stores all data which still needs to be feeded to the encryption.
a new object with type S, a subtype of T __new__(S, ...)
  _checkInst(self)
Instance checker.
  _CipherStream__getPass(self)
Retrieve the password this stream uses. (inherited from CipherStream)
  _feedEncrypt(self, data)
Feed the passed in packet to the encryption, and return any available data which comes back from the encryption routine.
  _feedEncryptRaw(self, data)
Feed the passed in packet to the encryption, and return any available data which comes back from the encryption routine.
  _feedOutput(self, ptype, pdata)
Feed packet to the output stream. (inherited from OutputStream)
  _start(self, cipher_algo, cipher_mode, IV, password, hash_algo)
Start the encryption stream with the passed in parameters, and create the crypto objects needed for the stream. (inherited from CipherStream)
  _stop(self)
Stop the encryption object by appending random data to the end of the buffer, so that a final block can be written if data is still pending encryption.
  _StreamBase__getData(self)
Retrieve the data from the output property as a string. (inherited from StreamBase)
  _writeOutput(self, data)
Append data to the output. (inherited from StreamBase)

Method Details

__init__(self)
(Constructor)

Initialize the encryption stream by creating the encryption buffer which stores all data which still needs to be feeded to the encryption. It also implements a stop marker on the encryption, after which all tries to encrypt will fail.

__new__(S, ...)

Returns:
a new object with type S, a subtype of T

_checkInst(self)

Instance checker. Called when a function of this class is called.

_feedEncrypt(self, data)

Feed the passed in packet to the encryption, and return any available data which comes back from the encryption routine.

_feedEncryptRaw(self, data)

Feed the passed in packet to the encryption, and return any available data which comes back from the encryption routine.

_stop(self)

Stop the encryption object by appending random data to the end of the buffer, so that a final block can be written if data is still pending encryption.

Generated by Epydoc 1.1 on Sun Aug 17 03:32:34 2003 http://epydoc.sf.net