Class LocalResponse

Local response loaded from a file. Note: Has to be initialized through init() before use.

Hierarchy

  • LocalResponse

Constructors

Properties

file: Buffer
inputHandle: string | Buffer

Methods

  • Returns the HMAC signature of the local response, from the secret key provided.

    Returns

    The HMAC signature of the local response.

    Parameters

    • secretKey: string | Buffer | Uint8Array

      Secret key, either a string or a byte/byte array.

    Returns string

  • Checks if the HMAC signature of the local response is valid.

    Returns

    True if the HMAC signature is valid.

    Parameters

    • secretKey: string | Buffer | Uint8Array

      Secret key, either a string or a byte/byte array.

    • signature: string

      The signature to be compared with.

    Returns boolean

Generated using TypeDoc