package
0.1.0
Repository: https://github.com/bpfs/dep2p.git
Documentation: pkg.go.dev

# Functions

SortByDistance takes a KeySpace, a center Key, and a list of Keys toSort.
XOR takes two byte slices, XORs them together, returns the resulting slice.
ZeroPrefixLen returns the number of consecutive zeroes in a byte slice.

# Variables

XORKeySpace is a KeySpace which: - normalizes identifiers using a cryptographic hash (sha256) - measures distance by XORing keys together.

# Structs

Key represents an identifier in a KeySpace.

# Interfaces

KeySpace is an object used to do math on identifiers.