hash

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2026 License: MIT Imports: 13 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.

README

Hash node

Type: hash
Category: Transform

Hashes a whole message property with sha256, sha1, sha512, or legacy md5.

Behavior

This node is registered as hash and runs as part of a workflow. Its exact runtime behavior is implemented in node.go; this document summarizes the editor-facing purpose and configuration contract.

Configuration

Field Type Default Description
algorithm string sha256 Algorithm — md5 is legacy and is not collision-resistant; prefer sha256 or sha512 for security-sensitive use
encoding string hex Output Encoding
source string payload Source Property — Property to hash as one whole byte sequence
target string msg.hash Target Property — Where the encoded hash is written; use payload to replace the payload or msg.* for metadata/attribute-style output

Implementation

  • node.go contains the executor, validation, schema, and registration.
  • editor.html contains the editor integration.
  • node_test.go, when present, contains behavioral tests.

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