Files
ahrav ee51fc5cc4 [feat] - Add Generic Hasher Interface with Blake2b Implementation (#3337)
* Add hasher interface and fnv + sha256 implemenations

* update

* remove

* fix test

* update

* remove

* remove

* fix spelling
2024-09-26 20:11:42 -07:00

13 lines
311 B
Go

package hasher
import "golang.org/x/crypto/blake2b"
// Blake2b implements the Hasher interface using Blake2b algorithm.
type Blake2b struct{ baseHasher }
// NewBlake2B creates a new Blake2b hasher.
func NewBlake2B() *Blake2b {
h, _ := blake2b.New256(nil)
return &Blake2b{baseHasher: baseHasher{hash: h}}
}