Class VaultSignature
java.lang.Object
java.security.SignatureSpi
org.honton.chas.jca.vault.provider.signature.VaultSignature
-
Field Summary
Fields inherited from class java.security.SignatureSpi
appRandom -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ObjectengineGetParameter(String param) protected voidengineInitSign(PrivateKey privateKey) Initializes this signature object with the specified private key for signing operations.protected voidengineInitVerify(PublicKey publicKey) Initializes this signature object with the specified public key for verification operations.protected voidengineSetParameter(String s, Object o) protected byte[]Returns the signature bytes of all the data updated so far.protected voidengineUpdate(byte b) Updates the data to be signed or verified using the specified byte.protected voidengineUpdate(byte[] b, int off, int len) Updates the data to be signed or verified, using the specified array of bytes, starting at the specified offset.protected booleanengineVerify(byte[] sigBytes) Verifies the passed-in signature.protected VaultApiMethods inherited from class java.security.SignatureSpi
clone, engineGetParameters, engineInitSign, engineSetParameter, engineSign, engineUpdate, engineVerify
-
Constructor Details
-
VaultSignature
-
-
Method Details
-
getVaultInstance
-
engineInitVerify
Initializes this signature object with the specified public key for verification operations.- Specified by:
engineInitVerifyin classSignatureSpi- Parameters:
publicKey- the public key of the identity whose signature is going to be verified.
-
engineInitSign
Initializes this signature object with the specified private key for signing operations.- Specified by:
engineInitSignin classSignatureSpi- Parameters:
privateKey- the private key of the identity whose signature will be generated. on.
-
engineUpdate
protected void engineUpdate(byte b) Updates the data to be signed or verified using the specified byte.- Specified by:
engineUpdatein classSignatureSpi- Parameters:
b- the byte to use for the update.
-
engineUpdate
protected void engineUpdate(byte[] b, int off, int len) Updates the data to be signed or verified, using the specified array of bytes, starting at the specified offset.- Specified by:
engineUpdatein classSignatureSpi- Parameters:
b- the array of bytesoff- the offset to start from in the array of byteslen- the number of bytes to use, starting at offset
-
engineSign
protected byte[] engineSign()Returns the signature bytes of all the data updated so far. The format of the signature depends on the underlying signature scheme.- Specified by:
engineSignin classSignatureSpi- Returns:
- the signature bytes of the signing operation's result.
-
engineVerify
protected boolean engineVerify(byte[] sigBytes) Verifies the passed-in signature.- Specified by:
engineVerifyin classSignatureSpi- Parameters:
sigBytes- the signature bytes to be verified.- Returns:
- true if the signature was verified, false if not.
-
engineSetParameter
- Specified by:
engineSetParameterin classSignatureSpi- Throws:
InvalidParameterException
-
engineGetParameter
- Specified by:
engineGetParameterin classSignatureSpi- Throws:
InvalidParameterException
-