crypto: use interface inheritance instead of inlining its function

This commit is contained in:
Piotr Mikołajczyk 2025-11-18 12:01:56 +01:00
parent e1211c8953
commit fd7ed1c977
No known key found for this signature in database
GPG key ID: 2E4C2AAD5E71D22D

View file

@ -64,7 +64,7 @@ type EllipticCurve interface {
// because it doesn't copy the internal state, but also modifies the internal state. // because it doesn't copy the internal state, but also modifies the internal state.
type KeccakState interface { type KeccakState interface {
hash.Hash hash.Hash
Read([]byte) (int, error) io.Reader
} }
// CreateAddress creates an ethereum address given the bytes and the nonce // CreateAddress creates an ethereum address given the bytes and the nonce