beecrypt::security::Signature Class Reference
[C++ classes mimicking java.security]

#include <Signature.h>

Inheritance diagram for beecrypt::security::Signature:

Inheritance graph
[legend]
Collaboration diagram for beecrypt::security::Signature:

Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual ~Signature ()
AlgorithmParametersgetParameters () const
void setParameter (const AlgorithmParameterSpec &) throw (InvalidAlgorithmParameterException)
void initSign (const PrivateKey &) throw (InvalidKeyException)
void initSign (const PrivateKey &, SecureRandom *) throw (InvalidKeyException)
void initVerify (const PublicKey &) throw (InvalidKeyException)
bytearray * sign () throw (IllegalStateException, SignatureException)
int sign (byte *, int, int) throw (ShortBufferException, IllegalStateException, SignatureException)
int sign (bytearray &) throw (IllegalStateException, SignatureException)
bool verify (const bytearray &) throw (IllegalStateException, SignatureException)
bool verify (const byte *, int, int) throw (IllegalStateException, SignatureException)
void update (byte) throw (IllegalStateException)
void update (const byte *, int, int) throw (IllegalStateException)
void update (const bytearray &) throw (IllegalStateException)
const StringgetAlgorithm () const throw ()
const ProvidergetProvider () const throw ()

Static Public Member Functions

static SignaturegetInstance (const String &algorithm) throw (NoSuchAlgorithmException)
 Returns a Signature object that implements the requested algorithm.
static SignaturegetInstance (const String &algorithm, const String &provider) throw (NoSuchAlgorithmException, NoSuchProviderException)
 Returns a Signature object that implements the requested algorithm, from the requested provider.
static SignaturegetInstance (const String &algorithm, const Provider &provider) throw (NoSuchAlgorithmException)

Protected Member Functions

 Signature (SignatureSpi *spi, const Provider *provider, const String &algorithm)

Protected Attributes

int state

Static Protected Attributes

static const int UNINITIALIZED = 0
static const int VERIFY = 1
static const int SIGN = 2


Constructor & Destructor Documentation

beecrypt::security::Signature::Signature ( SignatureSpi spi,
const Provider provider,
const String algorithm 
) [protected]

virtual beecrypt::security::Signature::~Signature (  )  [virtual]


Member Function Documentation

const String& beecrypt::security::Signature::getAlgorithm (  )  const throw ()

static Signature* beecrypt::security::Signature::getInstance ( const String algorithm,
const Provider provider 
) throw (NoSuchAlgorithmException) [static]

static Signature* beecrypt::security::Signature::getInstance ( const String algorithm,
const String provider 
) throw (NoSuchAlgorithmException, NoSuchProviderException) [static]

Returns a Signature object that implements the requested algorithm, from the requested provider.

Parameters:
algorithm the standard algorithm name.
provider the name of the provider.
Exceptions:
NoSuchAlgorithmException if the requested algorithm is not available in the requested provider.
NoSuchProviderException if the requested provider is not available.

static Signature* beecrypt::security::Signature::getInstance ( const String algorithm  )  throw (NoSuchAlgorithmException) [static]

Returns a Signature object that implements the requested algorithm.

If the default provider has an implementation of the requested algorithm that one is used; otherwise other providers are searched.

Parameters:
algorithm the standard name of the requested algorithm.
Exceptions:
NoSuchAlgorithmException if the requested algorithm is not available.

AlgorithmParameters* beecrypt::security::Signature::getParameters (  )  const

const Provider& beecrypt::security::Signature::getProvider (  )  const throw ()

void beecrypt::security::Signature::initSign ( const PrivateKey ,
SecureRandom  
) throw (InvalidKeyException)

void beecrypt::security::Signature::initSign ( const PrivateKey  )  throw (InvalidKeyException)

void beecrypt::security::Signature::initVerify ( const PublicKey  )  throw (InvalidKeyException)

void beecrypt::security::Signature::setParameter ( const AlgorithmParameterSpec  )  throw (InvalidAlgorithmParameterException)

int beecrypt::security::Signature::sign ( bytearray &   )  throw (IllegalStateException, SignatureException)

int beecrypt::security::Signature::sign ( byte *  ,
int  ,
int   
) throw (ShortBufferException, IllegalStateException, SignatureException)

bytearray* beecrypt::security::Signature::sign (  )  throw (IllegalStateException, SignatureException)

void beecrypt::security::Signature::update ( const bytearray &   )  throw (IllegalStateException)

void beecrypt::security::Signature::update ( const byte *  ,
int  ,
int   
) throw (IllegalStateException)

void beecrypt::security::Signature::update ( byte   )  throw (IllegalStateException)

bool beecrypt::security::Signature::verify ( const byte *  ,
int  ,
int   
) throw (IllegalStateException, SignatureException)

bool beecrypt::security::Signature::verify ( const bytearray &   )  throw (IllegalStateException, SignatureException)


Member Data Documentation

const int beecrypt::security::Signature::SIGN = 2 [static, protected]

const int beecrypt::security::Signature::UNINITIALIZED = 0 [static, protected]

const int beecrypt::security::Signature::VERIFY = 1 [static, protected]


The documentation for this class was generated from the following file:

Generated on Fri Jun 19 13:39:43 2009 for BeeCrypt C++ by  doxygen 1.5.8