pio

package
v0.0.0-...-d9774e7 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2016 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ConfigFileName is the name of the passgo config file.
	ConfigFileName = "config"
	// SiteFileName is the name of the passgo password store file.
	SiteFileName = "sites.json"
	// AttackFileName is the name of the passgo under attack file.
	AttackFileName = "attacked"
)

Variables

View Source
var (
	// MasterPassPrompt is the standard prompt string for all passgo
	MasterPassPrompt = "Enter master password"
)

Functions

func CheckAttackFile

func CheckAttackFile()

CheckAttackFile will determine if the attack file exists.

func CreateAttack

func CreateAttack() error

CreateAttack will create the attack file.

func GetAttackFileName

func GetAttackFileName() (f string, err error)

GetAttackFileName returns the full path of the attack file.

func GetConfigPath

func GetConfigPath() (p string, err error)

GetConfigPath is used to get the user's passgo directory.

func GetHomeDir

func GetHomeDir() (d string, err error)

func GetPassDir

func GetPassDir() (d string, err error)

GetPassDir is used to return the user's passgo directory.

func GetSiteFileBytes

func GetSiteFileBytes() (b []byte)

GetSiteFileBytes returns the bytes instead of a SiteFile

func GetSitesFile

func GetSitesFile() (d string, err error)

GetSitesFile will return the user's passgo vault.

func PassConfigExists

func PassConfigExists() (bool, error)

PassConfigExists is used to determine if the passgo config file exists in the user's passgo directory.

func PassDirExists

func PassDirExists() (bool, error)

PassDirExists is used to determine if the passgo directory in the user's home directory exists.

func Prompt

func Prompt(prompt string) (s string, err error)

Prompt will prompt a user for regular data from stdin.

func PromptPass

func PromptPass(prompt string) (pass string, err error)

PromptPass will prompt user's for a password by terminal.

func SitesVaultExists

func SitesVaultExists() (bool, error)

SitesVaultExists is used to determine if the password store exists in the user's passgo directory.

func ToClipboard

func ToClipboard(s string)

func UpdateVault

func UpdateVault(s SiteFile) (err error)

UpdateVault is used to replace the current password vault.

Types

type ConfigFile

type ConfigFile struct {
	MasterKeyPrivSealed []byte
	PubKeyHmac          []byte
	SiteHmac            []byte
	MasterPubKey        [32]byte
	MasterPassKeySalt   [32]byte
	HmacSalt            [32]byte
	SiteHmacSalt        [32]byte
}

ConfigFile represents the passgo config file.

func ReadConfig

func ReadConfig() (c ConfigFile, err error)

ReadConfig is used to return the passgo ConfigFile.

func (*ConfigFile) SaveFile

func (c *ConfigFile) SaveFile() (err error)

SaveFile is used by ConfigFiles to update the passgo config.

type PassFile

type PassFile interface {
	SaveFile() (err error)
}

PassFile is an interface for how all passgo files should be saved.

type SiteFile

type SiteFile []SiteInfo

SiteFile represents the entire passgo password store.

func GetVault

func GetVault() (s SiteFile)

GetVault is used to retrieve the password vault for the user.

type SiteInfo

type SiteInfo struct {
	PubKey     [32]byte
	PassSealed []byte
	Name       string
}

SiteInfo represents a single saved password entry.

func (*SiteInfo) AddSite

func (s *SiteInfo) AddSite() (err error)

AddSite is used by individual password entries to update the vault.

Jump to

Keyboard shortcuts

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