FileDocCategorySizeDatePackage
JDKISOSignature.javaAPI DocAndroid 1.5 API3895Wed May 06 22:41:06 BST 2009org.bouncycastle.jce.provider

JDKISOSignature

public class JDKISOSignature extends Signature

Fields Summary
private org.bouncycastle.crypto.signers.ISO9796d2Signer
signer
Constructors Summary
protected JDKISOSignature(String name, org.bouncycastle.crypto.Digest digest, org.bouncycastle.crypto.AsymmetricBlockCipher cipher)

        super(name);

        signer = new ISO9796d2Signer(cipher, digest, true);
    
Methods Summary
protected java.lang.ObjectengineGetParameter(java.lang.String param)

deprecated

        throw new UnsupportedOperationException("engineSetParameter unsupported");
    
protected voidengineInitSign(java.security.PrivateKey privateKey)

        CipherParameters    param = RSAUtil.generatePrivateKeyParameter((RSAPrivateKey)privateKey);

        signer.init(true, param);
    
protected voidengineInitVerify(java.security.PublicKey publicKey)

        CipherParameters    param = RSAUtil.generatePublicKeyParameter((RSAPublicKey)publicKey);

        signer.init(false, param);
    
protected voidengineSetParameter(java.security.spec.AlgorithmParameterSpec params)

        throw new UnsupportedOperationException("engineSetParameter unsupported");
    
protected voidengineSetParameter(java.lang.String param, java.lang.Object value)

deprecated
replaced with

        throw new UnsupportedOperationException("engineSetParameter unsupported");
    
protected byte[]engineSign()

        try
        {
            byte[]  sig = signer.generateSignature();

            return sig;
        }
        catch (Exception e)
        {
            throw new SignatureException(e.toString());
        }
    
protected voidengineUpdate(byte b)

        signer.update(b);
    
protected voidengineUpdate(byte[] b, int off, int len)

        signer.update(b, off, len);
    
protected booleanengineVerify(byte[] sigBytes)

        boolean yes = signer.verifySignature(sigBytes);

        return yes;