Class LocalResponse

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

Constructors

Methods

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

    Parameters

    • secretKey: string | Buffer | Uint8Array

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

    Returns string

    The HMAC signature of the local response.

  • Checks if the HMAC signature of the local response 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

    True if the HMAC signature is valid.