Function makeNoiseHandler
-
makeNoiseHandler(__namedParameters): {
authenticate: ((data) => void);
decodeFrame: ((newData,
onFrame) => Promise<void>);
decrypt: ((ciphertext) => Buffer);
encodeFrame: ((data) => Buffer);
encrypt: ((plaintext) => Buffer);
finishInit: (() => Promise<void>);
mixIntoKey: ((data) => Promise<void>);
processHandshake: ((__namedParameters,
noiseKey) => Promise<Buffer>);
}
-
Parameters
-
__namedParameters:
{
NOISE_HEADER: Uint8Array;
keyPair: KeyPair;
logger: ILogger;
routingInfo?: Buffer;
}
-
NOISE_HEADER: Uint8Array
-
-
logger: ILogger
-
Optional
routingInfo?: Buffer
Returns {
authenticate: ((data) => void);
decodeFrame: ((newData,
onFrame) => Promise<void>);
decrypt: ((ciphertext) => Buffer);
encodeFrame: ((data) => Buffer);
encrypt: ((plaintext) => Buffer);
finishInit: (() => Promise<void>);
mixIntoKey: ((data) => Promise<void>);
processHandshake: ((__namedParameters,
noiseKey) => Promise<Buffer>);
}
-
authenticate: ((data) => void)
-
-
(data): void
-
Returns void
-
decodeFrame: ((newData,
onFrame) => Promise<void>)
-
-
(newData,
onFrame): Promise<void>
-
Parameters
-
newData:
Uint8Array | Buffer
-
onFrame: ((buff)
=> void)
-
-
(buff): void
-
Returns
void
Returns
Promise<void>
-
decrypt: ((ciphertext) => Buffer)
-
-
(ciphertext): Buffer
-
Returns
Buffer
-
encodeFrame: ((data) => Buffer)
-
-
(data): Buffer
-
Parameters
-
data:
Uint8Array | Buffer
Returns
Buffer
-
encrypt: ((plaintext) => Buffer)
-
-
(plaintext): Buffer
-
Returns
Buffer
-
finishInit: (() => Promise<void>)
-
-
(): Promise<void>
-
Returns
Promise<void>
-
mixIntoKey: ((data) => Promise<void>)
-
-
(data): Promise<void>
-
Returns
Promise<void>
-
processHandshake: ((__namedParameters,
noiseKey) => Promise<Buffer>)
-
-
(__namedParameters, noiseKey): Promise<Buffer>
-
Returns
Promise<Buffer>