PackageKey.fromBytes constructor

PackageKey.fromBytes({
  1. required String use,
  2. required String alg,
  3. required Uint8List pub,
  4. KeyEntryStatus status = KeyEntryStatus.active,
})

A key held as raw material rather than as the base64 an advertisement carries — what a freshly minted KEM keypair hands back.

Derives the same kid as the base64 constructor over the same bytes.

Implementation

PackageKey.fromBytes({
  required String use,
  required String alg,
  required Uint8List pub,
  KeyEntryStatus status = KeyEntryStatus.active,
}) : this(use: use, alg: alg, pub: base64Encode(pub), status: status);