Viewing File: /home/ubuntu/route-and-root-frontend-base/node_modules/ethereum-cryptography/src/hash-utils.ts

import { Hash } from "crypto";

export function createHashFunction(
  hashConstructor: () => Hash
): (msg: Buffer) => Buffer {
  return msg => {
    const hash = hashConstructor();
    hash.update(msg);
    return Buffer.from(hash.digest());
  };
}
Back to Directory File Manager