mindee
    Preparing search index...

    Class LocalResponse

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

    Hierarchy

    • LocalResponseBase
      • LocalResponse
    Index
    initialized: boolean = false

    Whether the local response payload has been loaded.

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

      Parameters

      • secretKey: string | Buffer<ArrayBufferLike> | Uint8Array<ArrayBufferLike>

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

      Returns string

      The HMAC signature of the local response.

    • Loads the local payload from a string, buffer, or file path.

      Returns Promise<void>

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

      Parameters

      • secretKey: string | Buffer<ArrayBufferLike> | Uint8Array<ArrayBufferLike>

        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.