RFC 9180 HPKE setup, seal, and open.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
deriveKeyPair(
{required HpkeKem kem, required Uint8List ikm}) → Future< HpkeKeyPair> -
Derives a key pair from
ikm(RFC 9180DeriveKeyPair). -
generateKeyPair(
HpkeKem kem) → Future< HpkeKeyPair> -
Generates a fresh key pair for
kem. -
open(
{required HpkeSuite suite, required HpkeMode mode, required Uint8List enc, required Uint8List ciphertext, required HpkeKeyPair recipientKey, Uint8List? info, Uint8List? aad, Uint8List? psk, Uint8List? pskId, Uint8List? senderPublicKey}) → Future< ({HpkeContext context, Uint8List plaintext})> - Opens one message produced by seal. The returned context has consumed sequence 0.
-
seal(
{required HpkeSuite suite, required HpkeMode mode, required Uint8List recipientPublicKey, required Uint8List plaintext, Uint8List? info, Uint8List? aad, Uint8List? psk, Uint8List? pskId, HpkeKeyPair? senderKey, Uint8List? ephemeralIkm}) → Future< ({Uint8List ciphertext, HpkeContext context, Uint8List enc})> - Seals one message. The returned context has already consumed sequence 0, so a later HpkeContext.seal continues at sequence 1. HpkeContext.export is unaffected.
-
setupRecipient(
{required HpkeSuite suite, required HpkeMode mode, required Uint8List enc, required HpkeKeyPair recipientKey, Uint8List? info, Uint8List? psk, Uint8List? pskId, Uint8List? senderPublicKey}) → Future< HpkeContext> -
Setup<mode>R.encis the encapsulated key from setupSender. -
setupSender(
{required HpkeSuite suite, required HpkeMode mode, required Uint8List recipientPublicKey, Uint8List? info, Uint8List? psk, Uint8List? pskId, HpkeKeyPair? senderKey, Uint8List? ephemeralIkm}) → Future< ({HpkeContext context, Uint8List enc})> -
Setup<mode>S. Returns the encapsulated key and a sender context.