"path/filepath"
"go.cypherpunks.ru/recfile"
- "golang.org/x/crypto/blake2b"
"golang.org/x/sys/unix"
+ "lukechampine.com/blake3"
)
var DirPrefix string
}
func fileHash(fd *os.File) (string, error) {
- h, err := blake2b.New256(nil)
- if err != nil {
- panic(err)
- }
- if _, err = io.Copy(h, bufio.NewReader(fd)); err != nil {
+ h := blake3.New(32, nil)
+ if _, err := io.Copy(h, bufio.NewReader(fd)); err != nil {
return "", err
}
return hex.EncodeToString(h.Sum(nil)), nil