Interface KeyParameter
public interface KeyParameter
POJO containing the parameters for a key managed by SAM, whether it's a system key or a work key.
- Since:
- 0.2.0
-
Method Summary
Modifier and TypeMethodDescriptionbyteReturns the key algorithm.bytegetKif()Returns the key identifier (KIF).bytegetKvc()Returns the key version (KVC).bytegetParameterValue(int parameterNumber) Returns the value of the parameter whose number is provided.byte[]Retrieves the raw data of the key's parameters.
-
Method Details
-
getRawData
byte[] getRawData()Retrieves the raw data of the key's parameters.- Returns:
- a byte array of 13 bytes representing the key's parameters, including KIF, KVC, algorithm, and PAR1 to PAR10.
- Since:
- 0.2.0
-
getKif
byte getKif()Returns the key identifier (KIF).- Returns:
- The KIF value.
- Since:
- 0.2.0
-
getKvc
byte getKvc()Returns the key version (KVC).- Returns:
- The KVC value.
- Since:
- 0.2.0
-
getAlgorithm
byte getAlgorithm()Returns the key algorithm.- Returns:
- The algorithm identification byte.
- Since:
- 0.2.0
-
getParameterValue
byte getParameterValue(int parameterNumber) Returns the value of the parameter whose number is provided.- Parameters:
parameterNumber- The number of the parameter to get (in range [1..10]).- Returns:
- The parameter value.
- Throws:
IllegalArgumentException- If the argument is out of range.- Since:
- 0.2.0
-