llarp

package
v0.0.0-...-88b9acc Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2018 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ServiceAddress

type ServiceAddress [32]byte

ServiceAddress is the 256-bit blake2b hash of the bencoded form of the ServiceInfo struct

func (ServiceAddress) String

func (sa ServiceAddress) String() string

type ServiceInfo

type ServiceInfo struct {
	// long term public key used for encryption
	EncryptionPublicKey [32]byte `json:"e"`
	// long term public key used for signatures
	SigningPublicKey [32]byte `json:"s"`
	// protocol version
	Version uint `json:"v"`
	// nonce used to enable vanity addresses
	Nonce [16]byte `json:"x"`
}

ServiceInfo describes the "public information blob" for a hidden service

func (ServiceInfo) Bencoded

func (si ServiceInfo) Bencoded() (be []byte, err error)

Bencoded returns a bencoded form of the ServiceInfo struct

func (ServiceInfo) ServiceAddress

func (si ServiceInfo) ServiceAddress() (sa ServiceAddress, err error)

ServiceAddress returns the service address for the ServiceInfo struct, defined as Blake2b-256(Bencode(ServiceInfo))

Jump to

Keyboard shortcuts

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