Language

IkeSessionParams.Builder.SetAuthPsk(Byte[]) Method

Definition

Configures the IkeSession to use pre-shared-key-based authentication.

[Android.Runtime.Register("setAuthPsk", "([B)Landroid/net/ipsec/ike/IkeSessionParams$Builder;", "", ApiSince=31)]
public Android.Net.IpSec.Ike.IkeSessionParams.Builder SetAuthPsk(byte[] sharedKey);
[<Android.Runtime.Register("setAuthPsk", "([B)Landroid/net/ipsec/ike/IkeSessionParams$Builder;", "", ApiSince=31)>]
member this.SetAuthPsk : byte[] -> Android.Net.IpSec.Ike.IkeSessionParams.Builder

Parameters

sharedKey
Byte[]

the shared key. This value cannot be null.

Returns

Builder this, to facilitate chaining. This value cannot be null.

Attributes

Remarks

Configures the IkeSession to use pre-shared-key-based authentication.

Both client and server MUST be authenticated using the provided shared key. IKE authentication will fail if the remote peer tries to use other authentication methods.

Callers MUST declare only one authentication method. Calling this function will override the previously set authentication configuration.

Callers SHOULD NOT use this if any other authentication methods can be used; PSK-based authentication is generally considered insecure.

Android reference for android.net.ipsec.ike.IkeSessionParams.Builder.setAuthPsk.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to