Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

PK_Signer Class Reference

#include <cryptlib.h>

Inheritance diagram for PK_Signer:

PK_SignatureScheme PrivateKeyAlgorithm AsymmetricAlgorithm Algorithm Clonable PK_SignatureSchemeBase< H, PK_Signer, DigestSigner > PK_SignerWithRecovery PK_SignerBase< H > SignerWithRecoveryTemplate< TF, H > PK_SignatureSchemeImpl< PK_SignerBase< H >, DS > PK_SignerImpl< DS, H > List of all members.

Detailed Description

interface for public-key signers

Definition at line 1231 of file cryptlib.h.

Public Member Functions

virtual void Sign (RandomNumberGenerator &rng, HashTransformation *messageAccumulator, byte *signature) const
 sign and delete messageAccumulator (even in case of exception thrown)

virtual void SignAndRestart (RandomNumberGenerator &rng, HashTransformation &messageAccumulator, byte *signature) const=0
 sign and restart messageAccumulator

virtual void SignMessage (RandomNumberGenerator &rng, const byte *message, unsigned int messageLen, byte *signature) const
 sign a message

virtual HashTransformationNewSignatureAccumulator () const
 create a new HashTransformation to accumulate the message to be signed

virtual unsigned int SignatureLength () const=0
 signature length support by this object (as either input or output)

virtual HashTransformationNewMessageAccumulator () const=0
 deprecated, please use PK_Signer::NewSignatureAccumulator or PK_Verifier::NewVerificationAccumulator instead

CryptoMaterialAccessMaterial ()
 returns a reference to the crypto material used by this object

const CryptoMaterialGetMaterial () const
 returns a const reference to the crypto material used by this object

virtual PrivateKeyAccessPrivateKey ()=0
virtual const PrivateKeyGetPrivateKey () const
void BERDecode (BufferedTransformation &bt)
 for backwards compatibility, calls AccessMaterial().Load(bt)

void DEREncode (BufferedTransformation &bt) const
 for backwards compatibility, calls GetMaterial().Save(bt)

virtual std::string AlgorithmName () const
 returns name of this algorithm, not universally implemented yet

virtual ClonableClone () const
 this is not implemented by most classes yet


Member Function Documentation

void PK_Signer::Sign RandomNumberGenerator rng,
HashTransformation messageAccumulator,
byte *  signature
const [virtual]
 

sign and delete messageAccumulator (even in case of exception thrown)

Precondition:
messageAccumulator was obtained by calling NewSignatureAccumulator()

HashTransformation::Final() has not been called on messageAccumulator

size of signature == SignatureLength()

Definition at line 619 of file cryptlib.cpp.

References SignAndRestart().

Referenced by SignerFilter::Put2().

void PK_Signer::SignMessage RandomNumberGenerator rng,
const byte *  message,
unsigned int  messageLen,
byte *  signature
const [virtual]
 

sign a message

Precondition:
size of signature == SignatureLength()

Definition at line 625 of file cryptlib.cpp.

References NewSignatureAccumulator(), and SignAndRestart().


The documentation for this class was generated from the following files:
Generated on Tue Jul 8 23:35:21 2003 for Crypto++ by doxygen 1.3.2