method

bun.CryptoHasher.hash

static hash(
): Buffer;

Run the hash over the given data

@param input

string, Uint8Array, or ArrayBuffer to hash. Uint8Array or ArrayBuffer is faster.

static hash(
hashInto: TypedArray
): TypedArray;

Run the hash over the given data

@param input

string, Uint8Array, or ArrayBuffer to hash. Uint8Array or ArrayBuffer is faster.

@param hashInto

TypedArray to write the hash into. Faster than creating a new one each time

static hash(
encoding: DigestEncoding
): string;

Run the hash over the given data

@param input

string, Uint8Array, or ArrayBuffer to hash. Uint8Array or ArrayBuffer is faster.

@param encoding

DigestEncoding to return the hash in