Class BaseDeterministicOrRandomSignature
java.lang.Object
java.security.SignatureSpi
org.bouncycastle.jcajce.provider.asymmetric.util.BaseDeterministicOrRandomSignature
- Direct Known Subclasses:
HashSignatureSpi, HashSignatureSpi, SignatureSpi, SignatureSpi
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AlgorithmParametersprotected booleanprotected AsymmetricKeyParameterprotected ContextParameterSpecFields inherited from class SignatureSpi
appRandom -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final ObjectengineGetParameter(String param) Deprecated.replaced with engineGetParameters()protected final AlgorithmParametersprotected final voidengineInitSign(PrivateKey privateKey) protected final voidengineInitSign(PrivateKey privateKey, SecureRandom random) protected final voidengineInitVerify(PublicKey publicKey) protected final voidengineSetParameter(String param, Object value) Deprecated.protected voidSet the signature context, either before or after engineInitSign / engineInitVerify.protected final voidengineUpdate(byte b) protected final voidengineUpdate(byte[] b, int off, int len) protected abstract voidreInitialize(boolean forSigning, CipherParameters params) protected abstract voidsignInit(PrivateKey privateKey, SecureRandom random) protected abstract voidupdateEngine(byte b) protected abstract voidupdateEngine(byte[] buf, int off, int len) protected abstract voidverifyInit(PublicKey publicKey) Methods inherited from class SignatureSpi
clone, engineSign, engineSign, engineUpdate, engineVerify, engineVerify
-
Field Details
-
engineParams
-
paramSpec
-
keyParams
-
isInitState
protected boolean isInitState
-
-
Constructor Details
-
BaseDeterministicOrRandomSignature
-
-
Method Details
-
engineInitVerify
- Specified by:
engineInitVerifyin classSignatureSpi- Throws:
InvalidKeyException
-
verifyInit
- Throws:
InvalidKeyException
-
engineInitSign
- Specified by:
engineInitSignin classSignatureSpi- Throws:
InvalidKeyException
-
engineInitSign
protected final void engineInitSign(PrivateKey privateKey, SecureRandom random) throws InvalidKeyException - Overrides:
engineInitSignin classSignatureSpi- Throws:
InvalidKeyException
-
signInit
protected abstract void signInit(PrivateKey privateKey, SecureRandom random) throws InvalidKeyException - Throws:
InvalidKeyException
-
engineUpdate
- Specified by:
engineUpdatein classSignatureSpi- Throws:
SignatureException
-
updateEngine
- Throws:
SignatureException
-
engineUpdate
- Specified by:
engineUpdatein classSignatureSpi- Throws:
SignatureException
-
updateEngine
- Throws:
SignatureException
-
engineSetParameter
protected void engineSetParameter(AlgorithmParameterSpec params) throws InvalidAlgorithmParameterException Set the signature context, either before or after engineInitSign / engineInitVerify.Where the signature has a key already the underlying signer is re-initialised with the new context at once; where it does not the context is recorded and applied when the key arrives, as the RSASSA-PSS implementation does with its own parameters. Calling this first used to let a NullPointerException out of a method declared to throw InvalidAlgorithmParameterException, from dereferencing the key that was not there yet (see github #2396).
- Overrides:
engineSetParameterin classSignatureSpi- Throws:
InvalidAlgorithmParameterException
-
reInitialize
-
engineGetParameters
- Overrides:
engineGetParametersin classSignatureSpi
-
engineSetParameter
Deprecated.- Specified by:
engineSetParameterin classSignatureSpi
-
engineGetParameter
Deprecated.replaced with engineGetParameters()- Specified by:
engineGetParameterin classSignatureSpi
-