mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-03-30 15:08:33 +00:00

* Use BLAKE2B instead of HASH160, and get rid of any usage of RIPEMD160 * Change genesis coinbase payload script to OP_FALSE * Fix tests after conflict * Remove duplicate tests * Change file name * Change atomic swap to use proper hash size
16 lines
350 B
Go
16 lines
350 B
Go
// Copyright (c) 2013-2017 The btcsuite developers
|
|
// Use of this source code is governed by an ISC
|
|
// license that can be found in the LICENSE file.
|
|
|
|
package util
|
|
|
|
import (
|
|
"golang.org/x/crypto/blake2b"
|
|
)
|
|
|
|
// HashBlake2b calculates the hash blake2b(b).
|
|
func HashBlake2b(buf []byte) []byte {
|
|
hashedBuf := blake2b.Sum256(buf)
|
|
return hashedBuf[:]
|
|
}
|