Commit a6a0b190 authored by Andreas Auernhammer's avatar Andreas Auernhammer Committed by Adam Langley

crypto: add BLAKE2b and BLAKE2s hash constants

Fixes golang/go#19060
Change-Id: I1844edc3dcccc8d83a11d1145b60b2b92f2658ca
Reviewed-on: https://go-review.googlesource.com/36876Reviewed-by: default avatarAdam Langley <agl@golang.org>
parent d271576a
......@@ -36,6 +36,10 @@ const (
SHA3_512 // import golang.org/x/crypto/sha3
SHA512_224 // import crypto/sha512
SHA512_256 // import crypto/sha512
BLAKE2s_256 // import golang.org/x/crypto/blake2s
BLAKE2b_256 // import golang.org/x/crypto/blake2b
BLAKE2b_384 // import golang.org/x/crypto/blake2b
BLAKE2b_512 // import golang.org/x/crypto/blake2b
maxHash
)
......@@ -55,6 +59,10 @@ var digestSizes = []uint8{
SHA3_512: 64,
MD5SHA1: 36,
RIPEMD160: 20,
BLAKE2s_256: 32,
BLAKE2b_256: 32,
BLAKE2b_384: 48,
BLAKE2b_512: 64,
}
// Size returns the length, in bytes, of a digest resulting from the given hash
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment