internal

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ClientName  = "spa"
	ProductName = "Secure password assistant"
)

Variables

View Source
var (
	ClientVersion = "0.0.0"
	ClientOS      = "unknown"
)

Functions

func NewUsageError

func NewUsageError(text string) error

func NewUsageErrorf

func NewUsageErrorf(format string, a ...interface{}) error

Types

type Configuration

type Configuration struct {
	BaseDir string
	// Server  ServerConfig
	Domain string
	User   string
	Secret SecretDigest
	Salt   SaltDigest

	Pin      int
	Pwd      PwdConfig
	Question QuestionConfig
	Count    int
}

type PwdConfig

type PwdConfig struct {
	Pepper string `json:"pepper"`
	Mask   string `json:"mask"`
	Length int    `json:"length"`
	Note   string `json:"note"`
}

type QuestionConfig

type QuestionConfig struct {
	Question string `json:"-"`
}

type SaltDigest

type SaltDigest struct {
	Raw  string
	Hash []byte
}

type SecretDigest

type SecretDigest struct {
	Raw    string
	NewRaw string

	// secret is split into two parts
	Stock []byte
	Foil  []byte
}

type ServerConfig

type ServerConfig struct {
	Port int
}

type UsageError

type UsageError struct {
	// contains filtered or unexported fields
}

UsageError represents incorrect usage.

0 -- success 1 -- general failure - any standard golang error 2 -- usage error defined here

func (*UsageError) Error

func (r *UsageError) Error() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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