migrate: move flock and hash utilities to shared package (#22640)
This commit is contained in:
parent
f1751401aa
commit
4ae7c77f8a
23 changed files with 929 additions and 41 deletions
7
packages/shared/src/util/hash.ts
Normal file
7
packages/shared/src/util/hash.ts
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
import { createHash } from "crypto"
|
||||
|
||||
export namespace Hash {
|
||||
export function fast(input: string | Buffer): string {
|
||||
return createHash("sha1").update(input).digest("hex")
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue