public static class SecuritySuite.SecuritySuiteBuilder
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
SecuritySuite |
build()
Build a security setup.
|
SecuritySuite.SecuritySuiteBuilder |
setAuthenticationKey(byte[] key)
Set the authentication key used mainly for authentication.
|
SecuritySuite.SecuritySuiteBuilder |
setAuthenticationMechanism(AuthenticationMechanism authenticationMechanism)
Set the authentication level, a client authenticates to a server.
|
SecuritySuite.SecuritySuiteBuilder |
setEncryptionMechanism(SecuritySuite.EncryptionMechanism encryptionMechanism)
Set the cryptographic algorithm.
|
SecuritySuite.SecuritySuiteBuilder |
setGlobalUnicastEncryptionKey(byte[] key)
Set the global encryption key.
|
SecuritySuite.SecuritySuiteBuilder |
setPassword(byte[] password)
Set the password for the authentication level AuthenticationMechanism.LOW.
|
SecuritySuite.SecuritySuiteBuilder |
setSecurityPolicy(SecuritySuite.SecurityPolicy securityPolicy)
Set the security policy for the connection.
|
public SecuritySuite.SecuritySuiteBuilder setSecurityPolicy(SecuritySuite.SecurityPolicy securityPolicy)
securityPolicy
- the security policy for the connectionpublic SecuritySuite.SecuritySuiteBuilder setEncryptionMechanism(SecuritySuite.EncryptionMechanism encryptionMechanism)
Default value is NONE.
encryptionMechanism
- the encryption algorithmpublic SecuritySuite.SecuritySuiteBuilder setAuthenticationMechanism(AuthenticationMechanism authenticationMechanism)
NOTE: only AuthenticationMechanism.NONE, AuthenticationMechanism.LOW and
AuthenticationMechanism.HLS5_GMAC are supported at the moment.
If AuthenticationMechanism.LOW is set, the password must be set.
If AuthenticationMechanism.HLS5_GMAC is set, the authentication key and the encryption key must
be set.
Default value is NONE.
authenticationMechanism
- the authentication mechanism.public SecuritySuite.SecuritySuiteBuilder setGlobalUnicastEncryptionKey(byte[] key)
Cryptographic Algorithm | Key length (bits) |
---|---|
SecuritySuite.EncryptionMechanism.AES_GMC_128 | 128 |
key
- the global unicast encryption key.public SecuritySuite.SecuritySuiteBuilder setPassword(byte[] password)
NOTE: Sets the authentication level to low.
password
- the password as byte array.public SecuritySuite.SecuritySuiteBuilder setAuthenticationKey(byte[] key)
The key must have the correct length for authentication level.
key
- the authentication key.public SecuritySuite build()