Skip to content

scram-node


Class: AsyncScramWorker ​

Defined in: index.d.ts:11

Remarks ​

Defines a class for asynchronous execution of SCRAM engine.

This class inherits from Napi::AsyncWorker to perform tasks in a separate thread and notify upon completion. It's designed to execute SCRAM-related operations asynchronously in a Node.js environment.

Constructors ​

Constructor ​

new AsyncScramWorker(callback, args): AsyncScramWorker

Defined in: index.d.ts:17

Parameters ​

callback ​

Callback

A Napi::Function reference for asynchronous callback.

args ​

string[]

0 A vector of command-line arguments for the SCRAM engine.

Returns ​

AsyncScramWorker

Remarks ​

Constructor for ScramWorker.

Methods ​

execute() ​

execute(): void

Defined in: index.d.ts:25

Returns ​

void

Remarks ​

Executes the main logic of the worker.

This method contains the task to be performed in the background thread. It's called automatically by the Node.js event loop.


onOK() ​

onOK(): void

Defined in: index.d.ts:33

Returns ​

void

Remarks ​

  • Callback method called upon successful execution.

This method is invoked when the Execute method completes successfully. It's responsible for handling the results and invoking the JavaScript callback.