From 940a333f1c1089efe0a77c4a05644ddc0d94e955 Mon Sep 17 00:00:00 2001 From: MariusVanDerWijden Date: Mon, 16 Mar 2026 13:59:08 +0100 Subject: [PATCH] crypto/keccak: push missing file --- crypto/keccak/keccak_state.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 crypto/keccak/keccak_state.go diff --git a/crypto/keccak/keccak_state.go b/crypto/keccak/keccak_state.go new file mode 100644 index 0000000000..c83709cec7 --- /dev/null +++ b/crypto/keccak/keccak_state.go @@ -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}} +}