Compare commits

...

No commits in common. "6942e2ac7ff6a93a293909d6a27be71ab5bd9a4a" and "341054857ecc5555e4bdf3f1e74486e120dd3759" have entirely different histories.

1 changed files with 2 additions and 1 deletions

View File

@ -27,7 +27,7 @@ func main() {
if err != nil {
panic(err)
}
hasher := blake3.New()
hasher := blake3.NewSized(*length)
for {
n, err := file.Read(buf[:])
hasher.Write(buf[:n])
@ -37,6 +37,7 @@ func main() {
panic(err)
}
}
file.Close()
hash := hasher.Sum([]byte{})
fmt.Print(hex.EncodeToString(hash))
fmt.Print(" ")