Added in API level 31

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

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

Adds an integrity algorithm to the SA proposal being built.

IkeSaProposal.Builder

Adds a pseudorandom function to the SA proposal being built.

IkeSaProposal

Validates and builds the IkeSaProposal.

Public constructors

Builder

Added in API level 31
Builder()

Public methods

addEncryptionAlgorithm

Added in API level 31
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.

build

Added in API level 31
fun build(): IkeSaProposal

Validates and builds the IkeSaProposal.

Return
IkeSaProposal the validated IkeSaProposal. This value cannot be null.