public class CipherSuite
extends java.lang.Object
Constructor and Description |
---|
CipherSuite(byte id,
byte authenticationAlgorithm,
byte confidentialityAlgorithm,
byte integrityAlgorithm) |
Modifier and Type | Method and Description |
---|---|
AuthenticationAlgorithm |
getAuthenticationAlgorithm()
Returns instance of AuthenticationAlgorithm class.
|
static java.util.List<CipherSuite> |
getCipherSuites(byte[] bytes)
Builds Cipher Suites collection from raw data received by
GetChannelCipherSuites commands. |
ConfidentialityAlgorithm |
getConfidentialityAlgorithm()
Returns instance of ConfidentialityAlgorithm class.
|
static CipherSuite |
getEmpty() |
byte |
getId() |
IntegrityAlgorithm |
getIntegrityAlgorithm()
Returns instance of IntegrityAlgorithm class.
|
void |
initializeAlgorithms(byte[] sik)
Initializes algorithms contained in this
CipherSuite . |
public CipherSuite(byte id, byte authenticationAlgorithm, byte confidentialityAlgorithm, byte integrityAlgorithm)
public byte getId()
public void initializeAlgorithms(byte[] sik) throws java.security.InvalidKeyException, java.lang.IllegalArgumentException, java.security.NoSuchAlgorithmException, javax.crypto.NoSuchPaddingException
CipherSuite
.sik
- - Session Integrity Key calculated during the opening of the
session or user password if 'one-key' logins are enabled.java.lang.IllegalArgumentException
java.security.InvalidKeyException
- - when initiation of the algorithm failsjava.security.NoSuchAlgorithmException
- - when initiation of the algorithm failsjavax.crypto.NoSuchPaddingException
- - when initiation of the algorithm failspublic AuthenticationAlgorithm getAuthenticationAlgorithm() throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
- when authentication algorithm code is incorrect.public IntegrityAlgorithm getIntegrityAlgorithm() throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
- when integrity algorithm code is incorrect.java.security.NoSuchAlgorithmException
- - when initiation of the algorithm failspublic ConfidentialityAlgorithm getConfidentialityAlgorithm() throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
- when confidentiality algorithm code is incorrect.public static java.util.List<CipherSuite> getCipherSuites(byte[] bytes)
GetChannelCipherSuites
commands. Cannot be executed in
GetChannelCipherSuitesResponseData
since data comes in 16-byte
packets and is fragmented. Supports only one integrity and one
confidentiality algorithm per suite.bytes
- - concatenated Cipher Suite Records received by
GetChannelCipherSuites
commands.public static CipherSuite getEmpty()
CipherSuite
with algorithms set to
AuthenticationRakpNone
, ConfidentialityNone
and
IntegrityNone
.