hostid

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const CONFIG_KEY = ""
View Source
const HOST_KEY_ID = "com.paranoco.host"
View Source
const KEYCHAIN_SERVICE_NAME = "com.paranoco"
View Source
const KEY_BIT_SIZE = 2048

Variables

This section is empty.

Functions

This section is empty.

Types

type HostIdentity

type HostIdentity struct {
	HostId     string
	PrivateKey []byte
	PublicKey  []byte
	Version    int
}

func GenerateIdentity

func GenerateIdentity() (*HostIdentity, error)

func LoadHostIdentity

func LoadHostIdentity() (*HostIdentity, error)

func (*HostIdentity) Save

func (h *HostIdentity) Save() error

func (*HostIdentity) SignNonce

func (h *HostIdentity) SignNonce(nonce string) ([]byte, error)

func (*HostIdentity) ToPublicHostIdentity

func (h *HostIdentity) ToPublicHostIdentity() *PublicHostIdentity

type PublicHostIdentity

type PublicHostIdentity struct {
	HostId    string
	PublicKey []byte
	Version   int
}

Jump to

Keyboard shortcuts

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