hashutil

package
v0.7.161 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package hashutil builds digests out of string parts without boundary collisions. Cache keys are assembled from several independent values, so the hash has to distinguish where one value ends and the next begins.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SumParts

func SumParts(parts ...string) string

SumParts returns the hex-encoded SHA-256 of parts, each mixed in with WritePart so the split between them is part of the digest.

func WritePart

func WritePart(h io.Writer, s string)

WritePart mixes s into h length-prefixed, so that concatenations of different parts cannot collide (["ab","c"] and ["a","bc"] hash differently).

Types

This section is empty.

Jump to

Keyboard shortcuts

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