summaryrefslogtreecommitdiffhomepage
path: root/src/helpers/toHash.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/helpers/toHash.ts')
-rw-r--r--src/helpers/toHash.ts10
1 files changed, 0 insertions, 10 deletions
diff --git a/src/helpers/toHash.ts b/src/helpers/toHash.ts
deleted file mode 100644
index 6e8db1d..0000000
--- a/src/helpers/toHash.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-import crypto from 'crypto';
-
-/**
- * Returns hash digest of the given data using the given algorithm.
- * @param data Data to hash
- * @return The hash
- */
-export default function toHash(data: Buffer, algo: string = 'SHA256'): Buffer {
- return crypto.createHash(algo).update(data).digest();
-}