hashname

package
v0.0.0-...-c0ffc74 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2015 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package hashname provides the Hashname type and its derivation functions.

See: https://github.com/telehash/telehash.org/tree/558332cd82dec3b619d194d42b3d16618f077e0f/v3/hashname

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidIntermediatePart = errors.New("hashname: invalid intermediate part")

ErrInvalidIntermediatePart is returned when deriving a Hashname

View Source
var ErrInvalidIntermediatePartID = errors.New("hashname: invalid intermediate part id")

ErrInvalidIntermediatePartID is returned when deriving a Hashname

View Source
var ErrInvalidKey = errors.New("hashname: invalid key")

ErrInvalidKey is returned when deriving a Hashname

View Source
var ErrNoIntermediateParts = errors.New("hashname: no intermediate parts")

ErrNoIntermediateParts is returned when deriving a Hashname

Functions

func PartsFromKeys

func PartsFromKeys(keys cipherset.Keys) cipherset.Parts

PartsFromKeys derives the intermediate parts from their respectve public keys.

Types

type H

type H string

H represents a hashname.

func FromIntermediates

func FromIntermediates(parts cipherset.Parts) (H, error)

FromIntermediates derives a hashname from its intermediate parts.

func FromKeyAndIntermediates

func FromKeyAndIntermediates(id uint8, key []byte, intermediates cipherset.Parts) (H, error)

FromKeyAndIntermediates derives a hasname from a public key and some intermediate parts.

func FromKeys

func FromKeys(keys cipherset.Keys) (H, error)

FromKeys derives a hashname from its public keys.

func (H) Network

func (h H) Network() string

func (H) String

func (h H) String() string

func (H) Valid

func (h H) Valid() bool

Valid returns true when h is a valid hashname. A hashname must match [a-z2-7]{52}.

Jump to

Keyboard shortcuts

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