Package g4ds :: Module securitycontroller :: Class SecurityController
[show private | hide private]
[frames | no frames]

Class SecurityController


Handles requests related to security and passes them to the appropriate implementation for the requested algorithm.
Method Summary
  __init__(self)
Yet empty Constructor.
String decrypt(self, message, algorithm)
Decrypts the message using the the given key and algorithm.
String encrypt(self, message, key, algorithm)
Encrypts the message using the the given key and algorithm.
String signMessage(self, message, algorithm)
Provides a signature for the given message.
Boolean validate(self, message, signature, key, algorithm)
Verifies, whether the given signature corrosponds with the given message.

Method Details

__init__(self)
(Constructor)

Yet empty Constructor.

decrypt(self, message, algorithm)

Decrypts the message using the the given key and algorithm.

The corresponding algorithm is loaded using the name and the messages together with the key is passed to the decryption method in there.

Key is not need here since the private key stored for this algorithm will be used.
Parameters:
message - Cipher text to be decrypted
           (type=String)
algorithm - Name of the algorithm to be used for decryption
           (type=String)
Returns:
Return value of the corresponding decrypt function within the implementation for the algorithm - plain text
           (type=String)

encrypt(self, message, key, algorithm)

Encrypts the message using the the given key and algorithm.

The corresponding algorithm is loaded using the name and the messages together with the key is passed to the encryption method in there.
Parameters:
message - Plain text to be encrypted
           (type=String)
key - Key to be used for encryption
           (type=String)
algorithm - Name of the algorithm to be used for encryption
           (type=String)
Returns:
Return value of the corresponding encrypt function within the implementation for the algorithm - cipher text
           (type=String)

signMessage(self, message, algorithm)

Provides a signature for the given message.

Key is not need here since the private key stored for this algorithm will be used.
Returns:
The signature
           (type=String)

validate(self, message, signature, key, algorithm)

Verifies, whether the given signature corrosponds with the given message.
Returns:
Indicates, whether message and signature belong togehter.
           (type=Boolean)

Generated by Epydoc 2.0 on Sat Oct 22 22:52:47 2005 http://epydoc.sf.net