Skip to main content

@bloock/sdk / Signature

Class: Signature

Represents a cryptographic signature along with additional metadata.

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new Signature(messageHash, signature, alg, kid, subject?): Signature

Constructs a Signature object with the specified parameters.

Parameters

NameType
messageHashstring
signaturestring
algstring
kidstring
subject?string

Returns

Signature

Defined in

entity/authenticity/signature.ts:37

Properties

alg

alg: string

Is the algorithm used for the signature.

Defined in

entity/authenticity/signature.ts:15


kid

kid: string

Is the key identifier associated with the signature. (public key or key ID).

Defined in

entity/authenticity/signature.ts:19


messageHash

messageHash: string

Is the hash of the message that was signed.

Defined in

entity/authenticity/signature.ts:23


signature

signature: string

Is the cryptographic signature.

Defined in

entity/authenticity/signature.ts:11


subject

Optional subject: string

Is an optional field representing the subject of the signature.

Defined in

entity/authenticity/signature.ts:27

Methods

getAlg

getAlg(): SignatureAlg

Returns the SignatureAlg based on the algorithm specified in the Alg field.

Returns

SignatureAlg

Defined in

entity/authenticity/signature.ts:69


toProto

toProto(): Signature

Returns

Signature

Defined in

entity/authenticity/signature.ts:55


fromProto

fromProto(s): Signature

Parameters

NameType
sSignature

Returns

Signature

Defined in

entity/authenticity/signature.ts:51