UNPKG

@peculiar/webcrypto

Version:
16 lines (15 loc) • 475 B
/** * Copyright (c) 2019-2026, Peculiar Ventures * SPDX-License-Identifier: MIT */ import "webcrypto-core"; import { Buffer } from "node:buffer"; import crypto from "node:crypto"; // src/mechs/shake/crypto.ts var ShakeCrypto = class { static digest(algorithm, data) { const hash = crypto.createHash(algorithm.name.toLowerCase(), { outputLength: algorithm.length }).update(Buffer.from(data)).digest(); return new Uint8Array(hash).buffer; } }; export { ShakeCrypto };