feat: add basic workings
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user