Mdigest
Bun

method

crypto.Hmac.digest

digest(): NonSharedBuffer;

Calculates the HMAC digest of all of the data passed using hmac.update(). If encoding is provided a string is returned; otherwise a Buffer is returned;

The Hmac object can not be used again after hmac.digest() has been called. Multiple calls to hmac.digest() will result in an error being thrown.

): string;

Calculates the HMAC digest of all of the data passed using hmac.update(). If encoding is provided a string is returned; otherwise a Buffer is returned;

The Hmac object can not be used again after hmac.digest() has been called. Multiple calls to hmac.digest() will result in an error being thrown.

@param encoding

The encoding of the return value.

Referenced types

type BinaryToTextEncoding = 'base64' | 'base64url' | 'hex' | 'binary'