hash

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2026 License: MIT Imports: 13 Imported by: ? modules, 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 hash contains the hash node: deterministic whole-property hashing with standard-library cryptographic hash algorithms.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Algorithm string `json:"algorithm"`
	Source    string `json:"source"`
	Target    string `json:"target"`
	Encoding  string `json:"encoding"`
}

Config holds the hash node configuration.

type Node

type Node struct {
	*nodebase.BaseNode
	// contains filtered or unexported fields
}

Node hashes one configured message property into another.

func NewNode

func NewNode(node nodestore.NodeInterface, cfg *Config) *Node

NewNode creates a hash node.

func (*Node) Execute

Execute hashes the configured source property. Input byte semantics are deterministic: strings are UTF-8 bytes, []byte passes through unchanged, and objects/arrays use the compact deterministic JSON encoding provided by encoding/json (including sorted object keys). Non-JSON values are errors.

Jump to

Keyboard shortcuts

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