Interface SignatureComputationData<T extends SignatureComputationData<T>>
- Type Parameters:
T
- The type of the lowest level child object.
- All Known Subinterfaces:
BasicSignatureComputationData
,TraceableSignatureComputationData
public interface SignatureComputationData<T extends SignatureComputationData<T>>
Contains the input/output data of the
FreeTransactionManager.prepareComputeSignature(SignatureComputationData)
method for common
signature computation modes.- Since:
- 0.1.0
-
Method Summary
Modifier and TypeMethodDescriptionbyte[]
Returns the computed signature.setData
(byte[] data, byte kif, byte kvc) Sets the data to be signed and the KIF/KVC of the key to be used for the signature computation.setKeyDiversifier
(byte[] diversifier) Sets a specific key diversifier to use before signing (optional).setSignatureSize
(int size) Sets the expected size of the signature in bytes, which can be between 1 and 8 bytes (optional).
-
Method Details
-
setData
Sets the data to be signed and the KIF/KVC of the key to be used for the signature computation.- Parameters:
data
- The data to be signed.kif
- The KIF of the key to be used for the signature computation.kvc
- The KVC of the key to be used for the signature computation.- Returns:
- The current instance.
- Since:
- 0.1.0
-
setSignatureSize
Sets the expected size of the signature in bytes, which can be between 1 and 8 bytes (optional).By default, the signature will be generated on 8 bytes.
Note: the longer the signature, the more secure it is.
- Parameters:
size
- The expected size [1..8]- Returns:
- The current instance.
- Since:
- 0.1.0
-
setKeyDiversifier
Sets a specific key diversifier to use before signing (optional).By default, the key diversification is performed with the full serial number of the target card or SAM depending on the transaction context (Card or SAM transaction).
- Parameters:
diversifier
- The diversifier to be used (from 1 to 8 bytes long).- Returns:
- The current instance.
- Since:
- 0.1.0
-
getSignature
byte[] getSignature()Returns the computed signature.- Returns:
- A byte array of 1 to 8 bytes.
- Throws:
IllegalStateException
- If the command has not yet been processed.- Since:
- 0.1.0
-