summaryrefslogtreecommitdiff
path: root/db/utils.go
diff options
context:
space:
mode:
Diffstat (limited to 'db/utils.go')
-rw-r--r--db/utils.go24
1 files changed, 0 insertions, 24 deletions
diff --git a/db/utils.go b/db/utils.go
deleted file mode 100644
index 0b0f1cb..0000000
--- a/db/utils.go
+++ /dev/null
@@ -1,24 +0,0 @@
-package db
-
-import (
- "encoding/base64"
- "lukechampine.com/blake3"
- "math/rand"
-)
-
-func ToBlake3(pass string) string {
- hash := blake3.Sum512([]byte(pass))
- hash64b := base64.StdEncoding.EncodeToString(hash[:])
-
- return "blake3-" + hash64b
-}
-
-func GenRandomString(n int) (string, error) {
- b := make([]byte, n)
- _, err := rand.Read(b)
- if err != nil {
- return "", err
- }
-
- return base64.URLEncoding.EncodeToString(b)[:n], nil
-}