10 lines
211 B
TypeScript
Raw Permalink Normal View History

2025-04-19 15:38:48 +08:00
"use strict";
import sha3 from "js-sha3";
import { arrayify, BytesLike } from "@ethersproject/bytes";
export function keccak256(data: BytesLike): string {
return '0x' + sha3.keccak_256(arrayify(data));
}