mirror of
https://github.com/arnaucube/go-iden3-crypto.git
synced 2026-02-07 11:36:41 +01:00
17 lines
428 B
Go
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)
|
|
}
|