mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-24 08:49:29 +00:00
crypto/keccak: push missing file
This commit is contained in:
parent
e0530706c7
commit
940a333f1c
1 changed files with 12 additions and 0 deletions
12
crypto/keccak/keccak_state.go
Normal file
12
crypto/keccak/keccak_state.go
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
package keccak
|
||||
|
||||
// KeccakState wraps sha3.state. In addition to the usual hash methods, it also supports
|
||||
// Read to get a variable amount of data from the hash state. Read is faster than Sum
|
||||
// because it doesn't copy the internal state, but also modifies the internal state.
|
||||
type KeccakState struct {
|
||||
state
|
||||
}
|
||||
|
||||
func NewLegacyKeccak256State() *KeccakState {
|
||||
return &KeccakState{state{rate: rateK512, outputLen: 32, dsbyte: dsbyteKeccak}}
|
||||
}
|
||||
Loading…
Reference in a new issue