1
0
Fork 0

Add time for better randomisation for a hash.

This commit is contained in:
Alexander Andreev 2023-08-06 07:33:34 +04:00
parent 3f16c3e799
commit 92212c97eb
Signed by: Arav
GPG Key ID: D22A817D95815393
1 changed files with 1 additions and 0 deletions

View File

@ -92,6 +92,7 @@ func (h *UploadHandlers) Upload(w http.ResponseWriter, r *http.Request) {
fHash := hex.EncodeToString(s256.Sum(nil))
s256.Write([]byte(h.hashSalt))
s256.Write([]byte(time.Now().String()))
fSaltedHash := base64.RawURLEncoding.EncodeToString(s256.Sum(nil))
f.Seek(0, io.SeekStart)