PublicKey class

An X-Wing public key for encrypting HPKE messages.

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

fingerprint() → Fingerprint
Returns a 256-bit unique identifier for this key. For HPKE, that is the SHA256 hash of the raw public key.
newSender({required Uint8List domain}) → (Sender, Uint8List)
Creates an HPKE sender context for multi-message encryption.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
seal({required Uint8List msgToSeal, required Uint8List msgToAuth, required Uint8List domain}) → (Uint8List, Uint8List)
Creates a standalone cryptographic construct encrypted to this public key. The construct will contain the given message-to-seal (encrypted) and also an authenticity proof for the (unencrypted) message-to-auth (message not included).
toBytes() → Uint8List
Converts a public key into a 1216-byte array.
toDer() → Uint8List
Serializes a public key into a DER buffer.
toPem() → String
Serializes a public key into a PEM string.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

fromBytes(Uint8List bytes) → PublicKey
Converts a 1216-byte array into a public key.
fromDer(Uint8List der) → PublicKey
Parses a DER buffer into a public key.
fromPem(String pem) → PublicKey
Parses a PEM string into a public key.