hpkeEncrypt
Encrypts data using HPKE according to RFC 9180.
The resulting ciphertext and encapsulated key should be sent to the receiver and both parties must also agree on the AAD used.
Return
the ciphertext and the encapsulated key.
Parameters
the cipher suite for selecting the KEM, KDF, and encryption algorithm. Presently only Algorithm.HPKE_BASE_P256_SHA256_AES128GCM is supported.
the public key of the receiver, curve must match the cipher suite.
the data to encrypt.
additional authenticated data.
Encrypts data using HPKE according to RFC 9180.
The resulting ciphertext and encapsulated key should be sent to the receiver and both parties must also agree on the AAD used.
Return
the ciphertext and the encapsulated key.
Parameters
the cipher suite for selecting the KEM, KDF, and encryption algorithm. Presently only Algorithm.HPKE_BASE_P256_SHA256_AES128GCM is supported.
the public key of the receiver, curve must match the cipher suite.
the data to encrypt.
additional authenticated data.