...
1
2
3
4
5 package blake2b
6
7 import (
8 "crypto"
9 "hash"
10 )
11
12 func init() {
13 newHash256 := func() hash.Hash {
14 h, _ := New256(nil)
15 return h
16 }
17 newHash384 := func() hash.Hash {
18 h, _ := New384(nil)
19 return h
20 }
21
22 newHash512 := func() hash.Hash {
23 h, _ := New512(nil)
24 return h
25 }
26
27 crypto.RegisterHash(crypto.BLAKE2b_256, newHash256)
28 crypto.RegisterHash(crypto.BLAKE2b_384, newHash384)
29 crypto.RegisterHash(crypto.BLAKE2b_512, newHash512)
30 }
31
View as plain text