Class: SignedMessage
Defined in: signatures.ts:25
A message together with its signature and metadata, self-contained and serialized as CBOR identical to quantum-safe-py's SignedMessage.
Properties
algorithm
readonlyalgorithm:string
Defined in: signatures.ts:31
Algorithm, e.g. Ed25519+ML-DSA-65.
context
readonlycontext:Uint8Array
Defined in: signatures.ts:33
Domain-separation context (at most 255 bytes). Part of what is signed.
isHybrid
readonlyisHybrid:boolean
Defined in: signatures.ts:39
True for classical+PQC hybrid signatures.
message
readonlymessage:Uint8Array
Defined in: signatures.ts:27
The signed message bytes.
signature
readonlysignature:Uint8Array
Defined in: signatures.ts:29
Signature blob: len(prefix) ‖ prefix ‖ payload (hybrid payload is CBOR with both signatures).
signedAt
readonlysignedAt:number
Defined in: signatures.ts:37
Unix time in seconds when signed. Metadata only: not covered by the signature.
signerFingerprint
readonlysignerFingerprint:string
Defined in: signatures.ts:35
Hex fingerprint of the signer's public key, or ''. Metadata, not authenticated.
Methods
inspect()
inspect():
SignedInfo
Defined in: signatures.ts:106
Non-secret metadata without echoing the message.
Returns
toBytes()
toBytes():
Uint8Array
Defined in: signatures.ts:96
Alias of SignedMessage.toCbor, matching SealedMessage.toBytes.
Returns
Uint8Array
toCbor()
toCbor():
Uint8Array
Defined in: signatures.ts:99
Returns
Uint8Array
toHex()
toHex():
string
Defined in: signatures.ts:102
Returns
string
toString()
toString():
string
Defined in: signatures.ts:109
Returns
string
fromBytes()
staticfromBytes(data):SignedMessage
Defined in: signatures.ts:63
Alias of SignedMessage.fromCbor, matching SealedMessage.fromBytes.
Parameters
data
Uint8Array
Returns
SignedMessage
fromCbor()
staticfromCbor(data):SignedMessage
Defined in: signatures.ts:59
Parses CBOR from SignedMessage.toCbor or quantum-safe-py SignedMessage.to_cbor().
Parameters
data
Uint8Array
Returns
SignedMessage
fromHex()
staticfromHex(hex):SignedMessage
Defined in: signatures.ts:67
Parses a hex string produced by SignedMessage.toHex.
Parameters
hex
string
Returns
SignedMessage
fromParts()
staticfromParts(parts):SignedMessage
Defined in: signatures.ts:71
Assembles a signed message from stored fields (for example separate database columns).
Parameters
parts
algorithm
string
context?
Uint8Array<ArrayBufferLike>
isHybrid?
boolean
message
Uint8Array
signature
Uint8Array
signedAt?
number
signerFingerprint?
string
Returns
SignedMessage