diff options
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") + } +} |
