다음을 통해 공유


IHpkeSpi.EngineInitSender Method

Definition

Initialises an HPKE SPI in one of the sender modes described in RFC 9180.

[Android.Runtime.Register("engineInitSender", "(Ljava/security/PublicKey;[BLjava/security/PrivateKey;[B[B)V", "GetEngineInitSender_Ljava_security_PublicKey_arrayBLjava_security_PrivateKey_arrayBarrayBHandler:Android.Crypto.Hpke.IHpkeSpiInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=35)]
public void EngineInitSender (Java.Security.IPublicKey recipientKey, byte[]? info, Java.Security.IPrivateKey? senderKey, byte[]? psk, byte[]? psk_id);
[<Android.Runtime.Register("engineInitSender", "(Ljava/security/PublicKey;[BLjava/security/PrivateKey;[B[B)V", "GetEngineInitSender_Ljava_security_PublicKey_arrayBLjava_security_PrivateKey_arrayBarrayBHandler:Android.Crypto.Hpke.IHpkeSpiInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=35)>]
abstract member EngineInitSender : Java.Security.IPublicKey * byte[] * Java.Security.IPrivateKey * byte[] * byte[] -> unit

Parameters

recipientKey
IPublicKey

public key of the recipient

info
Byte[]

application-supplied information, may be null or empty

senderKey
IPrivateKey

private key of the sender, for symmetric auth modes only, else null

psk
Byte[]

pre-shared key, for PSK auth modes only, else null

psk_id
Byte[]

pre-shared key ID, for PSK auth modes only, else null

Attributes

Remarks

Initialises an HPKE SPI in one of the sender modes described in RFC 9180.

If psk and psk_id are supplied then Pre-Shared Key Authentication will be used.

If senderKey is supplied then Asymmetric Key Authentication will be used.

If neither is supplied then "base" mode (no sender authentication) will be used.

Note that only base mode is currently supported on Android.

Public and private keys must be supplied in a format that can be used by the implementation. An instance of the "XDH"java.security.KeyFactory can be used to translate KeySpecs or keys from another java.security.Provider

Java documentation for android.crypto.hpke.HpkeSpi.engineInitSender(java.security.PublicKey, byte[], java.security.PrivateKey, byte[], byte[]).

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