Skip to content

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 ​

readonly algorithm: string

Defined in: signatures.ts:31

Algorithm, e.g. Ed25519+ML-DSA-65.


context ​

readonly context: Uint8Array

Defined in: signatures.ts:33

Domain-separation context (at most 255 bytes). Part of what is signed.


isHybrid ​

readonly isHybrid: boolean

Defined in: signatures.ts:39

True for classical+PQC hybrid signatures.


message ​

readonly message: Uint8Array

Defined in: signatures.ts:27

The signed message bytes.


signature ​

readonly signature: Uint8Array

Defined in: signatures.ts:29

Signature blob: len(prefix) ‖ prefix ‖ payload (hybrid payload is CBOR with both signatures).


signedAt ​

readonly signedAt: number

Defined in: signatures.ts:37

Unix time in seconds when signed. Metadata only: not covered by the signature.


signerFingerprint ​

readonly signerFingerprint: 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 ​

SignedInfo


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() ​

static fromBytes(data): SignedMessage

Defined in: signatures.ts:63

Alias of SignedMessage.fromCbor, matching SealedMessage.fromBytes.

Parameters ​

data ​

Uint8Array

Returns ​

SignedMessage


fromCbor() ​

static fromCbor(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() ​

static fromHex(hex): SignedMessage

Defined in: signatures.ts:67

Parses a hex string produced by SignedMessage.toHex.

Parameters ​

hex ​

string

Returns ​

SignedMessage


fromParts() ​

static fromParts(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

Apache-2.0.