feat: add basic workings

This commit is contained in:
2026-04-29 23:38:43 +02:00
parent da3dee9ae7
commit 76c893ae7e
14 changed files with 167 additions and 112 deletions
-5
View File
@@ -3,15 +3,10 @@ package security
import (
"crypto/rand"
"encoding/base64"
"orbits-server/internal/shared/utility"
"github.com/google/uuid"
)
func GenerateSafeCategoryName(category utility.MediaType, ext string) string {
return uuid.New().String() + "_" + string(category) + ext
}
func GenerateSafeName() string {
return uuid.New().String()
}
+3 -3
View File
@@ -13,11 +13,11 @@ import (
)
const (
argonTime = 3
argonMemory = 64 * 1024
argonTime = 1
argonMemory = 32 * 1024
argonThreads = 2
argonSaltLen = 16
argonKeyLen = 64
argonKeyLen = 32
)
func HashFileReader(r io.Reader) (string, error) {