ripemd160

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: May 8, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package ripemd160 provides a zero-allocation RIPEMD-160 hash implementation for FrogoDB key digest computation. Shared between server and client.

Index

Constants

View Source
const BlockSize = 64

BlockSize is the block size of RIPEMD-160 in bytes.

View Source
const DigestSize = 20

DigestSize is the size of a RIPEMD-160 hash in bytes.

Variables

This section is empty.

Functions

This section is empty.

Types

type Digest

type Digest struct {
	// contains filtered or unexported fields
}

Digest computes RIPEMD-160 hashes with zero allocations per call.

func New

func New() *Digest

New returns a new Digest computing the RIPEMD-160 checksum.

func (*Digest) Checksum

func (d *Digest) Checksum() [DigestSize]byte

Checksum returns the 20-byte RIPEMD-160 digest of all data written so far. It does not alter the running state; callers may continue writing after calling.

func (*Digest) Reset

func (d *Digest) Reset()

Reset resets the digest to its initial state for reuse.

func (*Digest) Sum

func (d *Digest) Sum(in []byte) []byte

Sum appends the current hash to in and returns the resulting slice.

func (*Digest) Write

func (d *Digest) Write(p []byte) (int, error)

Write adds data to the running hash. It always returns len(p), nil.

func (*Digest) WriteByte

func (d *Digest) WriteByte(b byte) error

WriteByte adds a single byte to the running hash without allocating.

Jump to

Keyboard shortcuts

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