diff options
| author | Dax <[email protected]> | 2026-04-15 11:50:24 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-04-15 15:50:24 +0000 |
| commit | 4ae7c77f8abda8d51ddf52ee6e07890fa19b6629 (patch) | |
| tree | d1b2891cb58ffe0d7d2a9e3af67340921f9f9758 /packages/shared/src/util/hash.ts | |
| parent | f1751401aa2c53a4a0215c6deddf93df306aac8b (diff) | |
| download | opencode-4ae7c77f8abda8d51ddf52ee6e07890fa19b6629.tar.gz opencode-4ae7c77f8abda8d51ddf52ee6e07890fa19b6629.zip | |
migrate: move flock and hash utilities to shared package (#22640)
Diffstat (limited to 'packages/shared/src/util/hash.ts')
| -rw-r--r-- | packages/shared/src/util/hash.ts | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/packages/shared/src/util/hash.ts b/packages/shared/src/util/hash.ts new file mode 100644 index 000000000..680e0f40b --- /dev/null +++ b/packages/shared/src/util/hash.ts @@ -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") + } +} |
