Skip to content

Commit c20d6e5

Browse files
committedFeb 21, 2016
crypto/sha3: Export Keccak-256 hash function
This hash function is slightly different from the standarized NIST SHA-3 as both of them use different domain separation bits.
1 parent 5387ad7 commit c20d6e5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed
 

‎crypto/sha3/hashes.go

+3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ import (
1212
"hash"
1313
)
1414

15+
// NewKeccak256 creates a new Keccak-256 hash.
16+
func NewKeccak256() hash.Hash { return &state{rate: 136, outputLen: 32, dsbyte: 0x01} }
17+
1518
// New224 creates a new SHA3-224 hash.
1619
// Its generic security strength is 224 bits against preimage attacks,
1720
// and 112 bits against collision attacks.

0 commit comments

Comments
 (0)