This abstract class provides applications with the interface of a digital signature algorithm such as RSA-MD5 or DSA-SHA1
![]() | ~SignatureImpl () Deletes this object |
![]() | getAlgorithm () const Returns a string that identifies the algorithm, independent of implementation details |
![]() | initSign (const PrivateKey& privKey) Initializes this object for signing |
![]() | initVerify (const PublicKey& pubKey) Initializes this object for verification |
![]() | update (const string& data) Updates the data to be signed or verified |
![]() | update (const string& data, int offset, int len) Updates the data to be signed or verified |
![]() | sign () Returns the digital signature of whatever data has been accumlated from the update calls |
![]() | sign (const string& data) Returns the digital signature of whatever data has been accumlated from the update calls plus the input data |
![]() | sign (const string& data, int offset, int len) Returns the digital signature of whatever data has been accumlated from the update calls plus the input data |
![]() | verify (const string& signature) Returns true if signature verifies |
This abstract class provides applications with the interface of a digital signature algorithm such as RSA-MD5 or DSA-SHA1. It also provides some of the functionality. The rest of the functionality is to be provided by the subclass implementors. Typically the clients will not deal with an instance of this class directly. Instead they interact with the Signature reference-count pointer.A SignatureImpl object is initialized by calling either the intSign if we are signing or the initVerify method if we are verifying. The data is processed through it using the update methods. Once all the data has been updated, one of the sign methods will be should be called to compute the signature, or the verify method should be called to verify a signature.
virtual string getAlgorithm() const
void initSign(const PrivateKey& privKey)
void initVerify(const PublicKey& pubKey)
void update(const string& data)
void update(const string& data, int offset, int len)
offset - start index
len - the number of bytes to use starting at offset
string sign()
SecurityException if signature fails
string sign(const string& data)
SecurityException if signature fails
sign() string sign(const string& data, int offset, int len)
SecurityException if signature fails
int - offset into string of data to use
int - len number of bytes of data to use in update call
bool verify(const string& signature)
SignatureImpl()
virtual void resetEngine()
virtual void doUpdate(const string& data, int offset, int len)
offset - start index
len - the number of bytes to use starting at offset virtual string doSign()
SecurityException if signature fails virtual bool doVerify(const string& signature)
virtual string paramString() const
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