diff options
author | Matthew Miller <matthew@millerti.me> | 2020-05-20 08:44:12 -0700 |
---|---|---|
committer | Matthew Miller <matthew@millerti.me> | 2020-05-20 08:44:12 -0700 |
commit | 2c51287bec3592ebf7d40d886c41da8fb51cbc21 (patch) | |
tree | 603ec65541ea461cbe78c198c34574238eebd10a /src/helpers/toHash.ts | |
parent | d9074ec54935aa2155151d2dd9dea0974f33da29 (diff) |
Initialize lerna project and move code to `server`
Diffstat (limited to 'src/helpers/toHash.ts')
-rw-r--r-- | src/helpers/toHash.ts | 10 |
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(); -} |