Function makeNoiseHandler

  • Parameters

    • __namedParameters: {
          NOISE_HEADER: Uint8Array;
          keyPair: KeyPair;
          logger: Logger;
          mobile: boolean;
      }
      • NOISE_HEADER: Uint8Array
      • keyPair: KeyPair
      • logger: Logger
      • mobile: boolean

    Returns {
        authenticate: ((data) => void);
        decodeFrame: ((newData, onFrame) => void);
        decrypt: ((ciphertext) => Buffer);
        encodeFrame: ((data) => Buffer);
        encrypt: ((plaintext) => Buffer);
        finishInit: (() => void);
        mixIntoKey: ((data) => void);
        processHandshake: ((__namedParameters, noiseKey) => Buffer);
    }

    • authenticate: ((data) => void)
        • (data): void
        • Parameters

          • data: Uint8Array

          Returns void

    • decodeFrame: ((newData, onFrame) => void)
        • (newData, onFrame): void
        • Parameters

          • newData: Uint8Array | Buffer
          • onFrame: ((buff) => void)
              • (buff): void
              • Parameters

                Returns void

          Returns void

    • decrypt: ((ciphertext) => Buffer)
        • (ciphertext): Buffer
        • Parameters

          • ciphertext: Uint8Array

          Returns Buffer

    • encodeFrame: ((data) => Buffer)
        • (data): Buffer
        • Parameters

          • data: Uint8Array | Buffer

          Returns Buffer

    • encrypt: ((plaintext) => Buffer)
        • (plaintext): Buffer
        • Parameters

          • plaintext: Uint8Array

          Returns Buffer

    • finishInit: (() => void)
        • (): void
        • Returns void

    • mixIntoKey: ((data) => void)
        • (data): void
        • Parameters

          • data: Uint8Array

          Returns void

    • processHandshake: ((__namedParameters, noiseKey) => Buffer)

Generated using TypeDoc