Module xmlsec :: Class EncCtx
[frames | no frames]

Class EncCtx


Method Summary
  __init__(self, keysMngr, _obj)
Creates <enc:EncryptedData/> element processing context.
  __getattr__(self, name)
  __setattr__(self, name, value)
  binaryEncrypt(self, tmpl, data, dataSize)
Encrypts data according to template tmpl.
  copyUserPref(self, dst)
Copies user preference from src context.
  debugDump(self, output)
Prints the debug information about enc context to output.
  debugXmlDump(self, output)
Prints the debug information about enc context to output in XML format.
  decrypt(self, node)
Decrypts node and if necessary replaces node with decrypted data.
  decryptToBuffer(self, node)
Decrypts node data to the encCtx buffer.
  destroy(self)
Destroys context object.
  finalize(self)
Cleans up context object.
  initialize(self, keysMngr)
Initializes <enc:EncryptedData/> element processing context.
  reset(self)
Resets enc context object, user settings are not touched.
  uriEncrypt(self, tmpl, uri)
Encrypts data from uri according to template tmpl.
  xmlEncrypt(self, tmpl, node)
Encrypts node according to template tmpl.

Method Details

__init__(self, keysMngr=None, _obj=None)
(Constructor)

Creates <enc:EncryptedData/> element processing context. The caller is
responsible for destroying returned object by calling destroy method.
keysMngr : the keys manager.
Returns  : newly context object or None if an error occurs.

binaryEncrypt(self, tmpl, data, dataSize)

Encrypts data according to template tmpl.
tmpl     : the <enc:EncryptedData/> template node.
data     : the binary buffer.
dataSize : the data buffer size.
Returns  : 0 on success or a negative value if an error occurs.

copyUserPref(self, dst)

Copies user preference from src context.
dst     : the destination context.
Returns : 0 on success or a negative value if an error occurs.

debugDump(self, output)

Prints the debug information about enc context to output.
output : the output file.

debugXmlDump(self, output)

Prints the debug information about enc context to output in XML format.
output : the output file.

decrypt(self, node)

Decrypts node and if necessary replaces node with decrypted data.
node    : the <enc:EncryptedData/> node.
Returns : 0 on success or a negative value if an error occurs.

decryptToBuffer(self, node)

Decrypts node data to the encCtx buffer.
node    : the <enc:EncryptedData/> node.
Returns : 0 on success or a negative value if an error occurs.

destroy(self)

Destroys context object.

finalize(self)

Cleans up context object.

initialize(self, keysMngr)

Initializes <enc:EncryptedData/> element processing context. The caller
is responsible for cleaing up returned object by calling finalize method.
keysMngr : the keys manager.
Returns  : 0 on success or a negative value if an error occurs.

reset(self)

Resets enc context object, user settings are not touched.

uriEncrypt(self, tmpl, uri)

Encrypts data from uri according to template tmpl.
tmpl    : the <enc:EncryptedData/> template node.
uri     : the URI.
Returns : 0 on success or a negative value if an error occurs.

xmlEncrypt(self, tmpl, node)

Encrypts node according to template tmpl. If requested, node is replaced
with result <enc:EncryptedData/> node.
tmpl    : the <enc:EncryptedData/> template node.
node    : the node for encryption.
Returns : 0 on success or a negative value if an error occurs.

Generated by Epydoc 2.0 on Mon Feb 9 01:09:34 2004 http://epydoc.sf.net