Files
go-iden3-crypto/babyjub/helpers.go
2020-04-14 16:53:24 +02:00

17 lines
428 B
Go

package babyjub
import (
"github.com/dchest/blake512" // I have personally reviewed that this module doesn't do anything suspicious
)
// Blake512 performs the blake-512 hash over the buffer m. Note that this is
// the original blake from the SHA3 competition and not the new blake2 version.
func Blake512(m []byte) []byte {
h := blake512.New()
_, err := h.Write(m[:])
if err != nil {
panic(err)
}
return h.Sum(nil)
}