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

Class KeyData


Method Summary
  __init__(self, id, _obj)
Creates new key data of the specified type id.
  __getattr__(self, name)
  __setattr__(self, name, value)
  checkId(self, id)
Returns 1 if data is valid and data's id is equal to dataId.
  checkSize(self, size)
Returns 1 if data is valid and data's object has at least size bytes.
  checkUsage(self, usage)
Returns 1 if data is valid and could be used for usage.
  debugDump(self, output)
Prints key data debug info.
  debugXmlDump(self, output)
Prints key data debug info in XML format.
  destroy(self)
Destroys the data and frees all allocated memory.
  duplicate(self)
Creates a duplicate of the given data.
  generate(self, sizeBits, type)
Generates new key data of given size and type.
  getIdentifier(self)
Gets key data identifier string.
  getName(self)
Returns the key data name.
  getSize(self)
Gets key data size.
  getType(self)
Gets key data type.
  isValid(self)
Returns 1 if KeyData object is not None and id attribut is not None or 0 otherwise.

Method Details

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

Creates new key data of the specified type id. Caller is responsible for
destroing returned object with destroy method.
id      : the data id.
Returns : the newly key data object or None if an error occurs.

checkId(self, id)

Returns 1 if data is valid and data's id is equal to dataId.
id : the data Id.

checkSize(self, size)

Returns 1 if data is valid and data's object has at least size bytes.
size : the expected size.

checkUsage(self, usage)

Returns 1 if data is valid and could be used for usage.
usage : the data usage.

debugDump(self, output)

Prints key data debug info.
output : the output FILE.

debugXmlDump(self, output)

Prints key data debug info in XML format.
output : the output FILE.

destroy(self)

Destroys the data and frees all allocated memory.

duplicate(self)

Creates a duplicate of the given data. Caller is responsible for
destroing returned object with destroy function.
Returns : the newly key data object or None if an error occurs.

generate(self, sizeBits, type)

Generates new key data of given size and type.
sizeBits : the desired key data size (in bits).
type     : the desired key data type.
Returns  : 0 on success or a negative value otherwise.

getIdentifier(self)

Gets key data identifier string.
Returns : key data id string.

getName(self)

Returns the key data name.

getSize(self)

Gets key data size.
Returns : key data size (in bits).

getType(self)

Gets key data type.
Returns : key data type.

isValid(self)

Returns 1 if KeyData object is not None and id attribut is not None
or 0 otherwise.

Generated by Epydoc 2.1 on Sun Jan 1 18:42:41 2006 http://epydoc.sf.net