Skip to content

Commit 683d4d3

Browse files
committed
fix(crypto): Use correct blake2 version for the hash digest length
Signed-off-by: Steffen Vogel <[email protected]>
1 parent 536efec commit 683d4d3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

types.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"encoding/base64"
88
"encoding/hex"
99

10-
"golang.org/x/crypto/blake2s"
10+
"golang.org/x/crypto/blake2b"
1111
"golang.org/x/crypto/chacha20poly1305"
1212
)
1313

@@ -53,7 +53,7 @@ func msgTypeFromPayload(pl payload) msgType {
5353
}
5454

5555
const (
56-
hashSize = blake2s.Size
56+
hashSize = blake2b.Size256
5757

5858
sidSize = 4 // Session ID size
5959
pidSize = hashSize // Peer ID size

0 commit comments

Comments
 (0)