namespace Akenti class OpenSSLSignatureImpl : public SignatureImpl

This class implements the digital signature interface defined in SignatureImpl by holding a ENV_MD_CTX object and wrapping the appropriate openssl functions

Inheritance:


Public Methods

string getAlgorithm () const
Returns a string that identifies the algorithm, independent of implementation details

Protected Methods

void resetEngine ()
Resets the digest engine
void doUpdate (const string &data, int offset, int len)
Updates the data to be signed or verified
string doSign ()
Returns the digital signature of all the data that has been accumlated from update calls
bool doVerify (const string &signature)
Returns true if signature verifies, false otherwise
string paramString () const
Returns a string representation for OpenSSLSignatureImpl which is used for debugging purposes

Inherited from SignatureImpl:

Public Methods

void initSign(const PrivateKey& privateKey)
void initVerify(const PublicKey& publicKey)
void update(const string& data)
void update(const string& data, int offset, int len)
string sign()
string sign(const string& data)
string sign(const string& data, int offset, int len)
bool verify(const string& signature)

Documentation

This class implements the digital signature interface defined in SignatureImpl by holding a ENV_MD_CTX object and wrapping the appropriate openssl functions. Typically the clients will not deal with an instance of this class directly. Instead they interact with the Signature reference-count pointer.
string getAlgorithm() const
Returns a string that identifies the algorithm, independent of implementation details. The name should be a standard name such as "RSA-MD5" or "DSA-SHA1"
Returns:
name of the algorithm

void resetEngine()
Resets the digest engine

void doUpdate(const string &data, int offset, int len)
Updates the data to be signed or verified.
Parameters:
data - the string of bytes to use for the update
offset - start index
len - the number of bytes to use starting at offset

string doSign()
Returns the digital signature of all the data that has been accumlated from update calls.
Throws:
Error if the private key is uninitialized
SecurityException if signature fails

bool doVerify(const string &signature)
Returns true if signature verifies, false otherwise. All the data that has been accumulated by update calls is signed by the public key and the results are compared to the input signature. If they match verify is true.
Throws:
Error if initVerify has not been called or if the public key is uninitialized
Parameters:
signature - digital signature to be verified
See Also:
doVerify(const string&)

string paramString() const
Returns a string representation for OpenSSLSignatureImpl which is used for debugging purposes.
Returns:
debugging info


This class has no child classes.
Author:
Srilekha Mudumbai Abdelilah Essiari
Version:
1.1 00/05/01
See Also:
SignatureImpl
Error
getProvider()
getSignature(const string&)

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de