libpass

package
v0.0.0-...-64a9713 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2018 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultServer string = "https://pass.conradludgate.com/"
View Source
var Zeros [32]byte = [32]byte{
	0, 0, 0, 0, 0, 0, 0, 0,
	0, 0, 0, 0, 0, 0, 0, 0,
	0, 0, 0, 0, 0, 0, 0, 0,
	0, 0, 0, 0, 0, 0, 0, 0,
}

Functions

func Pair

func Pair(kf *KeyFile, server string, dur int, force bool) (err error)

func Verify

func Verify(kf *KeyFile) (err error)

Types

type Config

type Config struct {
	Server  string
	Keyfile string
}

func (*Config) LoadConfig

func (c *Config) LoadConfig()

type KeyFile

type KeyFile struct {
	Client Keys
	Phone  struct {
		Sign, Box [32]byte
	}
	// contains filtered or unexported fields
}

func NewKeyFile

func NewKeyFile(file *os.File) (kf *KeyFile, err error)

func (*KeyFile) Load

func (kf *KeyFile) Load() error

func (*KeyFile) Open

func (kf *KeyFile) Open(b []byte) (data []byte, ok bool)

func (*KeyFile) Save

func (kf *KeyFile) Save() error

func (*KeyFile) Seal

func (kf *KeyFile) Seal(data []byte) (b []byte)

func (*KeyFile) Sign

func (kf *KeyFile) Sign(data []byte) (b []byte)

func (*KeyFile) Unseal

func (kf *KeyFile) Unseal(b []byte) (data []byte, ok bool)

type Keys

type Keys struct {
	SignPriv [64]byte
	SignPub  [32]byte
	BoxPriv  [32]byte
	BoxPub   [32]byte
}

func (*Keys) Generate

func (k *Keys) Generate() (err error)

Jump to

Keyboard shortcuts

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