ASTBinarySigner class abstract

Produces the signature stored in a binary AST file's trailer.

The container treats a signature as opaque length-prefixed bytes, so any scheme fits: an HMAC, a public-key signature, or a call out to a hardware key store. HmacSha256Signer is the built-in implementation.

What signing buys, and what it does not

The CRC-32 every file carries detects accidental corruption. It is not a defence against anyone: an attacker who edits the file recomputes the CRC in microseconds. Only a signature made with a key the attacker does not have makes a binary AST file tamper-evident.

An unsigned file deserves exactly as much trust as the source it was produced from — loading one and running it is equivalent to running arbitrary code from that source.

Implementers

Constructors

ASTBinarySigner()

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
sign(Uint8List payload) Uint8List
Signs payload, returning at most ASTBinaryFormat.maxSignatureLength bytes.
toString() String
A string representation of this object.
inherited

Operators

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