Package pyGlobus :: Module security :: Class EVP_Key
[show private | hide private]
[frames | no frames]

Class EVP_Key


A class for the underlying EVP_PKEY* objects.
Method Summary
  __init__(self, handle, free)
Each instance wraps X509_REQ* EVP_PKEY* objects.
  __del__(self)
Deletes the underlying gss_cred_id_t object, and free's the memory if the instance owns the underlying handle.
  get_handle(self)
  sign(self, data)
Signes the data using the underlying key handle,
  verify(self, data, signature)
verifies the signature is a valid signature of the data

Method Details

__init__(self, handle=None, free=1)
(Constructor)

Each instance wraps X509_REQ* EVP_PKEY* objects.
Parameters:
handle - A SWIG'ized pointer to a EVP_PKEY* object.
free - Should the underlying objects be freed when an instance is destroyed.

__del__(self)
(Destructor)

Deletes the underlying gss_cred_id_t object, and free's the memory if the instance owns the underlying handle.

sign(self, data)

Signes the data using the underlying key handle,

You MUST be using a RSA key

The data MUST be hashed using sha1
Parameters:
data - A string of data to sign
Returns:
A signature of the data is returned
Raises:
EVP_KeyException - A EVP_KeyException is raised if the data can not be signed

verify(self, data, signature)

verifies the signature is a valid signature of the data

You MUST be using a RSA key

The data MUST be hashed using sha1
Parameters:
data - A string of the data that was signed
signature - A signature created by signing the data
Returns:
returns True if the signature was verified returns False otherwise
Raises:
EVP_KeyException - A EVP_KeyException is raised if there is an error calling verify

Generated by Epydoc 2.1 on Tue Apr 4 14:32:56 2006 http://epydoc.sf.net