package hash

import "github.com/gohugoio/hugo/tpl/hash"

Package hash provides non-cryptographic hash functions for template use.

Index

Types

type Namespace

type Namespace struct{}

Namespace provides template functions for the "hash" namespace.

func New

func New() *Namespace

New returns a new instance of the hash-namespaced template functions.

func (*Namespace) FNV32a

func (ns *Namespace) FNV32a(v any) (int, error)

FNV32a hashes v using fnv32a algorithm.

func (*Namespace) XxHash

func (ns *Namespace) XxHash(v any) (string, error)

XxHash returns the xxHash of the input string.

Source Files

hash.go

Version
v0.144.2 (latest)
Published
Feb 19, 2025
Platform
linux/amd64
Imports
6 packages
Last checked
8 hours ago

Tools for package owners.