UNPKG

@nfen/webcrypto-ts

Version:
24 lines 592 B
/** * Code related to SHA_384 * @module */ import * as WebCrypto from "../webcrypto.js"; import { Alg, ShaShared } from "./shared.js"; /** * Get the digest of the buffer * @example * ```ts * const buffer = new TextEncoder().encode("a file"); * const digest = SHA_384.digest(buffer); * ``` */ export const digest = async (data) => WebCrypto.digest(Alg.Variant.SHA_384, data); /** * Get the hex string of the digest * @example * ```ts * const hash = SHA_384.hexify(digest); * ``` */ export const hexify = (digest) => ShaShared.hexify(digest); //# sourceMappingURL=sha_384.js.map