fix: hasher needs the size set to 32

This commit is contained in:
Derrick Hammer 2023-05-11 15:24:49 -04:00
parent b44b12f85e
commit 294370d88d
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 2 additions and 1 deletions

View File

@ -26,7 +26,7 @@ func Init() {
func Upload(r io.ReadSeeker) (model.Upload, error) {
var upload model.Upload
hasher := blake3.New(0, nil)
hasher := blake3.New(32, nil)
_, err := io.Copy(hasher, r)
if err != nil {
@ -34,6 +34,7 @@ func Upload(r io.ReadSeeker) (model.Upload, error) {
}
hashBytes := hasher.Sum(nil)
hashHex := hex.EncodeToString(hashBytes[:])
if err != nil {