keccak

package
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 8, 2026 License: Apache-2.0 Imports: 1 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package keccak provides a utility wrapper for the sha256 legacy keccak implementation.

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Keccak256

type Keccak256 struct{}

func New

func New() *Keccak256

New creates a new Keccak256 hasher instance

func (*Keccak256) Hash

func (k *Keccak256) Hash(data ...[]byte) []byte

Hash generates the keccak256 hash from the input bytes

Example
var (
	input = []byte("random data")
	h     = New()
)

result := h.Hash(input)

fmt.Printf("%x", result)
Output:
6d4cca48b4c25bd111efc7f5a67b9d36e287fdb84246c12ae4e0f61190047dc3

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL