]> Cypherpunks.ru repositories - nncp.git/blobdiff - src/tmp.go
MTH
[nncp.git] / src / tmp.go
index da96a25bfd0785f9bdc7b8aa48e523b01c47360f..88a7ec3847801a9d9fdbddcdf7ae3d67bc2098f4 100644 (file)
@@ -26,8 +26,6 @@ import (
        "path/filepath"
        "strconv"
        "time"
-
-       "golang.org/x/crypto/blake2b"
 )
 
 func TempFile(dir, prefix string) (*os.File, error) {
@@ -64,10 +62,7 @@ func (ctx *Ctx) NewTmpFileWHash() (*TmpFileWHash, error) {
        if err != nil {
                return nil, err
        }
-       hsh, err := blake2b.New256(nil)
-       if err != nil {
-               return nil, err
-       }
+       hsh := MTHNew(0, 0)
        return &TmpFileWHash{
                W:   bufio.NewWriter(io.MultiWriter(hsh, tmp)),
                Fd:  tmp,