For the latest news and information visit
The GNU Crypto project

gnu.crypto.pki.provider
Class RSA

java.lang.Object
  extended by java.security.SignatureSpi
      extended by gnu.crypto.pki.provider.RSA
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
MD2withRSA, MD4withRSA, MD5withRSA, SHA1withRSA

public abstract class RSA
extends SignatureSpi
implements Cloneable


Field Summary
protected static OID DIGEST_ALGORITHM
          digestAlgorithm OBJECT IDENTIFIER ::= { iso(1) member-body(2) US(840) rsadsi(113549) digestAlgorithm(2) }
protected  OID digestAlgorithm
           
protected  MessageDigest md
           
protected  RSAPrivateKey signerKey
           
protected  RSAPublicKey verifierKey
           
 
Fields inherited from class java.security.SignatureSpi
appRandom
 
Constructor Summary
protected RSA(MessageDigest md, OID digestAlgorithm)
           
 
Method Summary
 Object clone()
           
protected  Object engineGetParameter(String param)
           
protected  void engineInitSign(PrivateKey privateKey)
           
protected  void engineInitSign(PrivateKey privateKey, SecureRandom random)
           
protected  void engineInitVerify(PublicKey publicKey)
           
protected  void engineSetParameter(String param, Object value)
           
protected  byte[] engineSign()
           
protected  int engineSign(byte[] out, int off, int len)
           
protected  void engineUpdate(byte b)
           
protected  void engineUpdate(byte[] buf, int off, int len)
           
protected  boolean engineVerify(byte[] sig)
           
protected  boolean engineVerify(byte[] sig, int off, int len)
           
 
Methods inherited from class java.security.SignatureSpi
engineGetParameters, engineSetParameter, engineUpdate
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DIGEST_ALGORITHM

protected static final OID DIGEST_ALGORITHM
digestAlgorithm OBJECT IDENTIFIER ::= { iso(1) member-body(2) US(840) rsadsi(113549) digestAlgorithm(2) }


digestAlgorithm

protected final OID digestAlgorithm

md

protected final MessageDigest md

signerKey

protected RSAPrivateKey signerKey

verifierKey

protected RSAPublicKey verifierKey
Constructor Detail

RSA

protected RSA(MessageDigest md,
              OID digestAlgorithm)
Method Detail

clone

public Object clone()
             throws CloneNotSupportedException
Overrides:
clone in class SignatureSpi
Throws:
CloneNotSupportedException

engineGetParameter

protected Object engineGetParameter(String param)
Specified by:
engineGetParameter in class SignatureSpi

engineSetParameter

protected void engineSetParameter(String param,
                                  Object value)
Specified by:
engineSetParameter in class SignatureSpi

engineInitSign

protected void engineInitSign(PrivateKey privateKey)
                       throws InvalidKeyException
Specified by:
engineInitSign in class SignatureSpi
Throws:
InvalidKeyException

engineInitSign

protected void engineInitSign(PrivateKey privateKey,
                              SecureRandom random)
                       throws InvalidKeyException
Overrides:
engineInitSign in class SignatureSpi
Throws:
InvalidKeyException

engineInitVerify

protected void engineInitVerify(PublicKey publicKey)
                         throws InvalidKeyException
Specified by:
engineInitVerify in class SignatureSpi
Throws:
InvalidKeyException

engineUpdate

protected void engineUpdate(byte b)
                     throws SignatureException
Specified by:
engineUpdate in class SignatureSpi
Throws:
SignatureException

engineUpdate

protected void engineUpdate(byte[] buf,
                            int off,
                            int len)
                     throws SignatureException
Specified by:
engineUpdate in class SignatureSpi
Throws:
SignatureException

engineSign

protected byte[] engineSign()
                     throws SignatureException
Specified by:
engineSign in class SignatureSpi
Throws:
SignatureException

engineSign

protected int engineSign(byte[] out,
                         int off,
                         int len)
                  throws SignatureException
Overrides:
engineSign in class SignatureSpi
Throws:
SignatureException

engineVerify

protected boolean engineVerify(byte[] sig)
                        throws SignatureException
Specified by:
engineVerify in class SignatureSpi
Throws:
SignatureException

engineVerify

protected boolean engineVerify(byte[] sig,
                               int off,
                               int len)
                        throws SignatureException
Overrides:
engineVerify in class SignatureSpi
Throws:
SignatureException

For the latest news and information visit
The GNU Crypto project

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