mirror of
https://github.com/Heretek-AI/opencode.git
synced 2026-11-23 07:59:33 -10:00
12 lines
306 B
TypeScript
12 lines
306 B
TypeScript
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")
|
|
}
|
|
}
|