fromBytes static method

PublicKey fromBytes(
  1. Uint8List bytes
)

Converts a 1216-byte array into a public key.

Throws if bytes is not 1216 bytes long, or if a coefficient of its ML-KEM-768 key falls outside the valid range [0, 3329).

Implementation

static PublicKey fromBytes(Uint8List bytes) =>
    PublicKey._(ffi.XhpkePublicKey.fromBytes(bytes: bytes));