package
6.8.15+incompatible
Repository: https://github.com/agilebits/beats.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# README

flowhash

The flowhash Go package provides Community ID flow hashing.

See https://github.com/corelight/community-id-spec

Usage

import "github.com/adriansr/flowhash"

func ExampleCommunityIDHash() {
	flow := flowhash.Flow{
		SourceIP:        net.ParseIP("10.1.2.3"),
		DestinationIP:   net.ParseIP("8.8.8.8"),
		SourcePort:      63521,
		DestinationPort: 53,
		Protocol:        17,
	}
	fmt.Println(flowhash.CommunityID.Hash(flow))
	// Output: 1:R7iR6vkxw+jaz3wjDfWMWooBdfc=
}