This commit is contained in:
Willy Kloucek
2021-03-01 15:23:47 +01:00
parent 82f75a2164
commit 1aac5a09d2
3 changed files with 6 additions and 5 deletions
@@ -1,7 +1,6 @@
package storage
import (
"crypto/md5"
"crypto/sha256"
"encoding/hex"
"io/ioutil"
@@ -113,8 +112,6 @@ func (s *FileSystem) storeImage(key string, img []byte) (string, error) {
// <filestorage-root>/users/<3 characters>/<3 characters>/<48 characters>/
// This will balance the folders in setups with many users.
func (s *FileSystem) userDir(username string) string {
mh := md5.New()
mh.Write([]byte("something"))
hash := sha256.New224()
if _, err := hash.Write([]byte(username)); err != nil {