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

Class Key


Method Summary
  __init__(self, _obj)
Creates and initializes new key.
  __getattr__(self, name)
  __setattr__(self, name, value)
  adoptData(self, data)
Adds data to the key.
  checkId(self, keyId)
Returns 1 if key is valid and key's id is equal to keyId.
  copy(self, keyDst)
Copies key data to keyDst.
  debugDump(self, output)
Prints the information about the key to the output.
  debugXmlDump(self, output)
Prints the information about the key to the output in XML format.
  destroy(self)
Destroys the key...
  duplicate(self)
Creates a duplicate of the given key.
  empty(self)
Clears the key data.
  ensureData(self, dataId)
If necessary, creates key data of dataId klass and adds to key.
  getData(self)
Gets key's data (see also adoptData method).
  getName(self)
Gets key name (see also setName function).
  getType(self)
Gets key type.
  getValue(self)
Gets key value (see also setValue method).
  isValid(self)
Returns 1 if key is not None and key->id is not None or 0 otherwise.
  match(self, name, keyReq)
Checks whether the key matches the given criteria.
  setName(self, name)
Sets key name (see also getName function).
  setValue(self, value)
Sets key value (see also setValue method).

Method Details

__init__(self, _obj=None)
(Constructor)

Creates and initializes new key. Caller is responsible for freeing
returned object with destroy method.
Returns : the newly key or None if an error occurs.

adoptData(self, data)

Adds data to the key. The data object will be destroyed by key.
data    : the key data.
Returns : 0 on success or a negative value otherwise.

checkId(self, keyId)

Returns 1 if key is valid and key's id is equal to keyId.
keyId : the key Id.

copy(self, keyDst)

Copies key data to keyDst.
keyDst  : the destination key.
Returns : 0 on success or a negative value if an error occurs.

debugDump(self, output)

Prints the information about the key to the output.
output : the output FILE.

debugXmlDump(self, output)

Prints the information about the key to the output in XML format.
output : the output FILE.

destroy(self)

Destroys the key

duplicate(self)

Creates a duplicate of the given key.
Returns : the newly key or None if an error occurs.

empty(self)

Clears the key data.

ensureData(self, dataId)

If necessary, creates key data of dataId klass and adds to key.
dataId  : the requested data klass.
Returns : key data or None if an error occurs.

getData(self)

Gets key's data (see also adoptData method).
dataId  : the requested data klass.
Returns : additional data associated with the key.

getName(self)

Gets key name (see also setName function).
Returns : key name.

getType(self)

Gets key type.
Returns : key type.

getValue(self)

Gets key value (see also setValue method).
Returns : key value (crypto material).

isValid(self)

Returns 1 if key is not None and key->id is not None or 0 otherwise.

match(self, name, keyReq)

Checks whether the key matches the given criteria.
name    : the key name (may be None).
keyReq  : the key requirements.
Returns : 1 if the key satisfies the given criteria or 0 otherwise.

setName(self, name)

Sets key name (see also getName function).
name    : the new key name.
Returns : 0 on success or a negative value if an error occurs.

setValue(self, value)

Sets key value (see also setValue method).
value   : the new value.
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