signer function

Fingerprint signer({
  1. required Uint8List signature,
})

Extracts the signer's fingerprint from a COSE_Sign1 signature without verifying it.

This allows looking up the appropriate verification key before attempting full signature verification.

  • signature: The serialized COSE_Sign1 structure

Returns the signer's fingerprint from the protected header's kid field. Throws if the envelope is malformed.

Implementation

xdsa.Fingerprint signer({required Uint8List signature}) =>
    xdsa.FingerprintInternal.wrap(ffi.coseSigner(signature: signature));