← Files AgentBrokoARCHIVED FILE

.venv/Lib/site-packages/eth_utils/crypto.py

299 Bytes · Sep 30, 2026 · 23:15 UTC

↓ Download file

from eth_hash.auto import (
    keccak as keccak_256,
)

from .conversions import (
    to_bytes,
)


def keccak(
    primitive: bytes | int | bool | None = None,
    hexstr: str | None = None,
    text: str | None = None,
) -> bytes:
    return bytes(keccak_256(to_bytes(primitive, hexstr, text)))

SHA-256: 67d395224f6c1f6cba8e55278dbc08e7af737647e25a1c5e4fdff6568ec08dca