// deno-lint-ignore-file
// deno-fmt-ignore-file

export interface InstantiateResult {
  instance: WebAssembly.Instance;
  exports: {
    digest: typeof digest;
    DigestContext : typeof DigestContext 
  };
}

/** Gets if the Wasm module has been instantiated. */
export function isInstantiated(): boolean;


/** Instantiates an instance of the Wasm module returning its functions.
* @remarks It is safe to call this multiple times and once successfully
* loaded it will always return a reference to the same object. */
export function instantiate(): InstantiateResult["exports"];

/** Instantiates an instance of the Wasm module along with its exports.
 * @remarks It is safe to call this multiple times and once successfully
 * loaded it will always return a reference to the same object. */
export function instantiateWithInstance(): InstantiateResult;

/**
* Returns the digest of the given `data` using the given hash `algorithm`.
*
* `length` will usually be left `undefined` to use the default length for
* the algorithm. For algorithms with variable-length output, it can be used
* to specify a non-negative integer number of bytes.
*
* An error will be thrown if `algorithm` is not a supported hash algorithm or
* `length` is not a supported length for the algorithm.
* @param {string} algorithm
* @param {Uint8Array} data
* @param {number | undefined} [length]
* @returns {Uint8Array}
*/
export function digest(algorithm: string, data: Uint8Array, length?: number): Uint8Array;
/**
* A context for incrementally computing a digest using a given hash algorithm.
*/
export class DigestContext {
  free(): void;
/**
* Creates a new context incrementally computing a digest using the given
* hash algorithm.
*
* An error will be thrown if `algorithm` is not a supported hash algorithm.
* @param {string} algorithm
*/
  constructor(algorithm: string);
/**
* Update the digest's internal state with the additional input `data`.
*
* If the `data` array view is large, it will be split into subarrays (via
* JavaScript bindings) which will be processed sequentially in order to
* limit the amount of memory that needs to be allocated in the Wasm heap.
* @param {Uint8Array} data
*/
  update(data: Uint8Array): void;
/**
* Returns the digest of the input data so far, and then drops the context
* from memory on the Wasm side. This context must no longer be used, and any
* further method calls will result in null pointer errors being thrown.
* https://github.com/rustwasm/wasm-bindgen/blob/bf39cfd8/crates/backend/src/codegen.rs#L186
*
* `length` will usually be left `undefined` to use the default length for
* the algorithm. For algorithms with variable-length output, it can be used
* to specify a non-negative integer number of bytes.
*
* An error will be thrown if `length` is not a supported length for the algorithm.
* @param {number | undefined} [length]
* @returns {Uint8Array}
*/
  digestAndDrop(length?: number): Uint8Array;
}

// denoCacheMetadata={"headers":{"cache-control":"public, max-age=31536000, immutable","set-cookie":"__cf_bm=NGWhmzcJwS_cob5IBWbUcv_l73wIwQo1Ad9LLBUjMlg-1785241875.2960122-1.0.1.1-c.pX1nm5AmLAquiPM3BXQuejL46dUJ6QSE5hQ.vlyRD.WyUsCq.lraxSclr0SPQ7XLCPl2fZlLZl2zAoHHvXWc0fleBC901JQN.FPXTgiRkIYt9dG98u5FfEA4OdFms_; HttpOnly; SameSite=None; Secure; Path=/; Domain=jsr.io; Expires=Tue, 28 Jul 2026 13:01:15 GMT","accept-ranges":"bytes","age":"865306","x-jsr-backend":"modules","report-to":"{\"group\":\"cf-nel\",\"max_age\":604800,\"endpoints\":[{\"url\":\"https://a.nel.cloudflare.com/report/v4?s=pCkMIJ4vWK3P2mh9lFtvYdpi2ahEtInm3U2Uh5TvDZqU5Naj%2FKUUZQIGH70JX56gd5rlg4TpXSKk738Ksgct4bn9dcJl6CdBn2r1wjEhGxrZoYiYrK4J54s%3D\"}]}","vary":"Origin","nel":"{\"report_to\":\"cf-nel\",\"success_fraction\":0.0,\"max_age\":604800}","content-type":"text/typescript","server":"cloudflare","cf-ray":"a223e6589cd97db6-LAX","cf-cache-status":"HIT","access-control-allow-origin":"*","x-content-type-options":"nosniff","cross-origin-resource-policy":"cross-origin","alt-svc":"h3=\":443\"; ma=86400","content-length":"2942","etag":"\"36ffd614d8bf97877fae968c4afbb60b\"","content-security-policy":"default-src 'none'; script-src 'none'; style-src 'none'; img-src 'none'; font-src 'none'; connect-src 'none'; frame-src 'none'; object-src 'none'; frame-ancestors 'none'; sandbox; form-action 'none';","x-robots-tag":"noindex","date":"Tue, 28 Jul 2026 12:31:15 GMT","access-control-expose-headers":"*"},"url":"https://jsr.io/@std/crypto/0.224.0/_wasm/lib/deno_std_wasm_crypto.generated.d.mts","time":1785241875}