gnu.crypto.jce.sig

Class SignatureAdapter

Implemented Interfaces:
Cloneable
Known Direct Subclasses:
DSSRawSignatureSpi, RSAPSSRawSignatureSpi

(package private) class SignatureAdapter
extends SignatureSpi
implements Cloneable

The implementation of a generic java.security.Signature adapter class to wrap gnu.crypto signature instances.

This class defines the Service Provider Interface (SPI) for the java.security.Signature class, which provides the functionality of a digital signature algorithm. Digital signatures are used for authentication and integrity assurance of digital data.

All the abstract methods in the java.security.SignatureSpi class are implemented by this class and all its sub-classes.

All the implementations which subclass this object, and which are serviced by the GNU Crypto provider implement the java.lang.Cloneable interface.

Version:
$Revision: 1.1 $

Constructor Summary

SignatureAdapter(String sigName, ISignatureCodec codec)
Trivial protected constructor.

Method Summary

Object
clone()
Object
engineGetParameter(String param)
void
engineInitSign(PrivateKey privateKey)
void
engineInitSign(PrivateKey privateKey, SecureRandom random)
void
engineInitVerify(PublicKey publicKey)
void
engineSetParameter(AlgorithmParameterSpec params)
void
engineSetParameter(String param, Object value)
byte[]
engineSign()
int
engineSign(byte[] outbuf, int offset, int len)
void
engineUpdate(byte b)
void
engineUpdate(byte[] b, int off, int len)
boolean
engineVerify(byte[] sigBytes)

Constructor Details

SignatureAdapter

protected SignatureAdapter(String sigName,
                           ISignatureCodec codec)
Trivial protected constructor.

Parameters:
sigName - the canonical name of the signature scheme.
codec - the signature codec engine to use with this scheme.

Method Details

clone

public Object clone()


engineGetParameter

public Object engineGetParameter(String param)
            throws InvalidParameterException


engineInitSign

public void engineInitSign(PrivateKey privateKey)
            throws InvalidKeyException


engineInitSign

public void engineInitSign(PrivateKey privateKey,
                           SecureRandom random)
            throws InvalidKeyException


engineInitVerify

public void engineInitVerify(PublicKey publicKey)
            throws InvalidKeyException


engineSetParameter

public void engineSetParameter(AlgorithmParameterSpec params)
            throws InvalidAlgorithmParameterException


engineSetParameter

public void engineSetParameter(String param,
                               Object value)
            throws InvalidParameterException


engineSign

public byte[] engineSign()
            throws SignatureException


engineSign

public int engineSign(byte[] outbuf,
                      int offset,
                      int len)
            throws SignatureException


engineUpdate

public void engineUpdate(byte b)
            throws SignatureException


engineUpdate

public void engineUpdate(byte[] b,
                         int off,
                         int len)
            throws SignatureException


engineVerify

public boolean engineVerify(byte[] sigBytes)
            throws SignatureException


Copyright © 2001, 2002, 2003 Free Software Foundation, Inc. All Rights Reserved.