Interface CommonSignatureComputationData<T extends CommonSignatureComputationData<T>>
-
- Type Parameters:
T
- The type of the lowest level child object.
- All Known Subinterfaces:
BasicSignatureComputationData
,TraceableSignatureComputationData
public interface CommonSignatureComputationData<T extends CommonSignatureComputationData<T>>
Contains the input/output data of theCommonTransactionManager.prepareComputeSignature(CommonSignatureComputationData)
method for common signature computation modes.- Since:
- 1.2.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description byte[]
getSignature()
Returns the computed signature.T
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.T
setKeyDiversifier(byte[] diversifier)
Sets a specific key diversifier to use before signing (optional).T
setSignatureSize(int size)
Sets the expected size of the signature in bytes, which can be between 1 and 8 bytes (optional).
-
-
-
Method Detail
-
setData
T 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.- 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:
- 1.2.0
-
setSignatureSize
T setSignatureSize(int size)
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:
- 1.2.0
-
setKeyDiversifier
T setKeyDiversifier(byte[] diversifier)
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:
- 1.2.0
-
getSignature
byte[] getSignature()
Returns the computed signature.- Returns:
- A byte array of 1 to 8 bytes.
- Throws:
java.lang.IllegalStateException
- If the command has not yet been processed.- Since:
- 1.2.0
-
-