]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - shared/core-utils/common/crypto.ts
Fix build
[github/Chocobozzz/PeerTube.git] / shared / core-utils / common / crypto.ts
diff --git a/shared/core-utils/common/crypto.ts b/shared/core-utils/common/crypto.ts
deleted file mode 100644 (file)
index 1a583f1..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-import { BinaryToTextEncoding, createHash } from 'crypto'
-
-function sha256 (str: string | Buffer, encoding: BinaryToTextEncoding = 'hex') {
-  return createHash('sha256').update(str).digest(encoding)
-}
-
-function sha1 (str: string | Buffer, encoding: BinaryToTextEncoding = 'hex') {
-  return createHash('sha1').update(str).digest(encoding)
-}
-
-// high excluded
-function randomInt (low: number, high: number) {
-  return Math.floor(Math.random() * (high - low) + low)
-}
-
-export {
-  randomInt,
-  sha256,
-  sha1
-}