opencode / packages /core /src /util /hash.ts
SaylorTwift's picture
SaylorTwift HF Staff
Add files using upload-large-folder tool
3e05655 verified
Raw
History Blame Contribute Delete
306 Bytes
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")
}
}