Builder
class Builder
| kotlin.Any | |
| ↳ | android.net.ipsec.ike.IkeSaProposal.Builder |
This class is used to incrementally construct a IkeSaProposal. IkeSaProposal instances are immutable once built.
Summary
| Public constructors | |
|---|---|
Builder() |
|
| Public methods | |
|---|---|
| IkeSaProposal.Builder |
addDhGroup(dhGroup: Int)Adds a Diffie-Hellman Group to the SA proposal being built. |
| IkeSaProposal.Builder |
addEncryptionAlgorithm(algorithm: Int, keyLength: Int)Adds an encryption algorithm with a specific key length to the SA proposal being built. |
| IkeSaProposal.Builder |
addIntegrityAlgorithm(algorithm: Int)Adds an integrity algorithm to the SA proposal being built. |
| IkeSaProposal.Builder |
addPseudorandomFunction(algorithm: Int)Adds a pseudorandom function to the SA proposal being built. |
| IkeSaProposal |
build()Validates and builds the IkeSaProposal. |
Public constructors
Public methods
addDhGroup
fun addDhGroup(dhGroup: Int): IkeSaProposal.Builder
Adds a Diffie-Hellman Group to the SA proposal being built.
| Return | |
|---|---|
IkeSaProposal.Builder |
Builder of IkeSaProposal. This value cannot be null. |
addEncryptionAlgorithm
fun addEncryptionAlgorithm(
algorithm: Int,
keyLength: Int
): IkeSaProposal.Builder
Adds an encryption algorithm with a specific key length to the SA proposal being built.
| Parameters | |
|---|---|
algorithm |
Int: encryption algorithm to add to IkeSaProposal. Value is android.net.ipsec.ike.SaProposal#ENCRYPTION_ALGORITHM_3DES, android.net.ipsec.ike.SaProposal#ENCRYPTION_ALGORITHM_AES_CBC, android.net.ipsec.ike.SaProposal#ENCRYPTION_ALGORITHM_AES_CTR, android.net.ipsec.ike.SaProposal#ENCRYPTION_ALGORITHM_AES_GCM_8, android.net.ipsec.ike.SaProposal#ENCRYPTION_ALGORITHM_AES_GCM_12, android.net.ipsec.ike.SaProposal#ENCRYPTION_ALGORITHM_AES_GCM_16, or android.net.ipsec.ike.SaProposal#ENCRYPTION_ALGORITHM_CHACHA20_POLY1305 |
keyLength |
Int: key length of algorithm. For algorithms that have fixed key length (e.g. 3DES) only SaProposal.KEY_LEN_UNUSED is allowed. |
| Return | |
|---|---|
IkeSaProposal.Builder |
Builder of IkeSaProposal. This value cannot be null. |
addIntegrityAlgorithm
fun addIntegrityAlgorithm(algorithm: Int): IkeSaProposal.Builder
Adds an integrity algorithm to the SA proposal being built.
| Return | |
|---|---|
IkeSaProposal.Builder |
Builder of IkeSaProposal. This value cannot be null. |
addPseudorandomFunction
fun addPseudorandomFunction(algorithm: Int): IkeSaProposal.Builder
Adds a pseudorandom function to the SA proposal being built.
| Return | |
|---|---|
IkeSaProposal.Builder |
Builder of IkeSaProposal. This value cannot be null. |
build
fun build(): IkeSaProposal
Validates and builds the IkeSaProposal.
| Return | |
|---|---|
IkeSaProposal |
the validated IkeSaProposal. This value cannot be null. |