Top Fields Constructors Methods
org.bouncycastle.crypto.internal.signers

public Class BaseRsaDigestSigner

extends Object
implements Signer
Class Inheritance
All Implemented Interfaces
org.bouncycastle.crypto.internal.Signer
Known Direct Subclasses
org.bouncycastle.crypto.fips.RsaDigestSigner, org.bouncycastle.crypto.general.RsaDigestSigner
Imports
java.io.IOException, org.bouncycastle.asn1.ASN1Encoding, .ASN1ObjectIdentifier, .DERNull, org.bouncycastle.asn1.x509.AlgorithmIdentifier, .DigestInfo, org.bouncycastle.crypto.InvalidSignatureException, org.bouncycastle.crypto.internal.AsymmetricBlockCipher, .CipherParameters, .CryptoException, .DataLengthException, .Digest, .Signer, org.bouncycastle.crypto.internal.params.AsymmetricKeyParameter, .ParametersWithRandom, org.bouncycastle.util.Arrays

Field Summary

Modifier and TypeField and Description
private final AlgorithmIdentifier
private final Digest
private boolean
private final AsymmetricBlockCipher

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static boolean
checkPKCS1Sig(byte[] expected, byte[] sig)

private byte[]
derEncode(byte[] hash)

public byte[]
generateSignature()

Implements org.bouncycastle.crypto.internal.Signer.generateSignature.

Generate a signature for the message we've been loaded with using the key we were initialised with.
public void
init(boolean
true if for signing, false otherwise
forSigning
,
CipherParameters
necessary parameters.
parameters
)

Implements org.bouncycastle.crypto.internal.Signer.init.

initialise the signer for signing or verification.
public void
reset()

Implements org.bouncycastle.crypto.internal.Signer.reset.

reset the internal state
public void
update(byte input)

Implements org.bouncycastle.crypto.internal.Signer.update.

update the internal digest with the byte b
public void
update(byte[] input, int inOff, int length)

Implements org.bouncycastle.crypto.internal.Signer.update.

update the internal digest with the byte array in
public boolean
verifySignature(byte[] signature)

Implements org.bouncycastle.crypto.internal.Signer.verifySignature.

return true if the internal state represents the signature described in the passed in array.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

algIdback to summary
private final AlgorithmIdentifier algId
digestback to summary
private final Digest digest
forSigningback to summary
private boolean forSigning
rsaEngineback to summary
private final AsymmetricBlockCipher rsaEngine

Constructor Detail

BaseRsaDigestSignerback to summary
public BaseRsaDigestSigner(AsymmetricBlockCipher rsaEngine, Digest digest, ASN1ObjectIdentifier digestOid)

Method Detail

checkPKCS1Sigback to summary
public static boolean checkPKCS1Sig(byte[] expected, byte[] sig)
derEncodeback to summary
private byte[] derEncode(byte[] hash) throws IOException
generateSignatureback to summary
public byte[] generateSignature() throws CryptoException, DataLengthException

Implements org.bouncycastle.crypto.internal.Signer.generateSignature.

Generate a signature for the message we've been loaded with using the key we were initialised with.

initback to summary
public void init(boolean forSigning, CipherParameters parameters)

Implements org.bouncycastle.crypto.internal.Signer.init.

initialise the signer for signing or verification.

Parameters
forSigning:boolean

true if for signing, false otherwise

parameters:CipherParameters

necessary parameters.

resetback to summary
public void reset()

Implements org.bouncycastle.crypto.internal.Signer.reset.

Doc from org.bouncycastle.crypto.internal.Signer.reset.

reset the internal state

updateback to summary
public void update(byte input)

Implements org.bouncycastle.crypto.internal.Signer.update.

update the internal digest with the byte b

updateback to summary
public void update(byte[] input, int inOff, int length)

Implements org.bouncycastle.crypto.internal.Signer.update.

update the internal digest with the byte array in

verifySignatureback to summary
public boolean verifySignature(byte[] signature) throws InvalidSignatureException

Implements org.bouncycastle.crypto.internal.Signer.verifySignature.

return true if the internal state represents the signature described in the passed in array.