Compare commits

..
1 Commits
Author SHA1 Message Date
gmp 6942e2ac7f Initial commit 2020-04-02 12:02:23 -04:00
+1 -2
View File
@@ -27,7 +27,7 @@ func main() {
if err != nil { if err != nil {
panic(err) panic(err)
} }
hasher := blake3.NewSized(*length) hasher := blake3.New()
for { for {
n, err := file.Read(buf[:]) n, err := file.Read(buf[:])
hasher.Write(buf[:n]) hasher.Write(buf[:n])
@@ -37,7 +37,6 @@ func main() {
panic(err) panic(err)
} }
} }
file.Close()
hash := hasher.Sum([]byte{}) hash := hasher.Sum([]byte{})
fmt.Print(hex.EncodeToString(hash)) fmt.Print(hex.EncodeToString(hash))
fmt.Print(" ") fmt.Print(" ")