UNPKG

@abdellatif.dev/cryptjs

Version:

A JavaScript/TypeScript library that brings cryptographic functionality from Dart to the web

12 lines (11 loc) 327 B
"use strict"; import { createHash } from "crypto"; export function toUtf16Bytes(str) { return Array.from(str, (char) => char.charCodeAt(0)); } export function hashBuffer(data, algorithm) { const hash = createHash(algorithm.name); hash.update(data); return Array.from(hash.digest()); } //# sourceMappingURL=utils.js.map