CertificateIdentity class

Extracts a stable public-key identity from an X.509 certificate.

The preferred output is the DER-encoded SubjectPublicKeyInfo (SPKI) — the same field TLS certificate pinning uses — so a hub keeps the same identity across certificate renewals as long as the keypair is reused. If the certificate cannot be parsed (unexpected structure), callers should fall back to hashing the whole certificate DER.

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

pemToDer(Uint8List pemBytes) → Uint8List?
Decodes the first CERTIFICATE block of a PEM document to DER bytes, or null if none is present.
spkiFromCertificate(Uint8List certBytes) → Uint8List?
Returns the DER SubjectPublicKeyInfo bytes from a PEM or DER certificate, or null if it cannot be located.