hash.ts 306 B

1234567891011
  1. import { createHash } from "crypto"
  2. export namespace Hash {
  3. export function fast(input: string | Buffer): string {
  4. return createHash("sha1").update(input).digest("hex")
  5. }
  6. export function sha256(input: string | Buffer): string {
  7. return createHash("sha256").update(input).digest("hex")
  8. }
  9. }