File size: 306 Bytes
3e05655
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
import { createHash } from "crypto"

export namespace Hash {
  export function fast(input: string | Buffer): string {
    return createHash("sha1").update(input).digest("hex")
  }

  export function sha256(input: string | Buffer): string {
    return createHash("sha256").update(input).digest("hex")
  }
}