Skip to content

Class: VerificationError ​

Defined in: errors.ts:145

A signature failed to verify. Deliberately carries no detail on why.

Extends ​

Constructors ​

Constructor ​

new VerificationError(message?): VerificationError

Defined in: errors.ts:150

Creates the error with code QS_VERIFICATION_FAILED.

Parameters ​

message? ​

string = 'Signature verification failed.'

Message text. Default Signature verification failed.; the library always uses the default so that no reason is revealed.

Returns ​

VerificationError

Overrides ​

CryptoError.constructor

Properties ​

code ​

readonly code: QsErrorCode

Defined in: errors.ts:65

Stable machine-readable identifier, e.g. QS_DECRYPTION_FAILED.

Inherited from ​

CryptoError.code


hint ​

readonly hint: string

Defined in: errors.ts:67

One-line, static suggestion for fixing the problem. Contains no sensitive data.

Inherited from ​

CryptoError.hint

Methods ​

toJSON() ​

toJSON(): object

Defined in: errors.ts:98

JSON-safe description, useful for logs and for coding agents.

Returns ​

object

name, code, message and hint; contains no key material.

code ​

code: QsErrorCode

hint ​

hint: string

message ​

message: string

name ​

name: string

Inherited from ​

CryptoError.toJSON


is() ​

static is(e): e is QuantumSafeError

Defined in: errors.ts:90

True for errors from any copy of this library. Prefer this to instanceof when an application might load both the ESM and the CommonJS build (each has its own class objects).

Parameters ​

e ​

unknown

Any value.

Returns ​

e is QuantumSafeError

true when e is an object carrying this library's error brand.

Inherited from ​

CryptoError.is

Apache-2.0.