core: Index | Files

package path

import ""

Package path provides routines for path selection.


Package Files


func New Uses

func New(rng *mRand.Rand, doc *pki.Document, recipient []byte, src, dst *pki.MixDescriptor, surbID *[constants.SURBIDLength]byte, baseTime time.Time, isFromClient, isForward bool) ([]*sphinx.PathHop, time.Time, error)

New creates a new path suitable for use in creating a Sphinx packet with the specified parameters.

Note: Forward packets originating from a client have slightly different path requirements than internally sourced packets or response packets as it includes the 0th hop.

func ToString Uses

func ToString(doc *pki.Document, p []*sphinx.PathHop) ([]string, error)

ToString returns a slice of strings representing the "useful" component of each PathHop, suitable for debugging.

Package path imports 10 packages (graph) and is imported by 2 packages. Updated 2019-03-24. Refresh now. Tools for package owners.