Documentation ¶
Index ¶
- Constants
- type Config
- func (c *Config) GetClientID() (string, error)
- func (c *Config) GetClientSecret() (string, error)
- func (c *Config) GetMasterKey() ([]byte, error)
- func (c *Config) GetMasterPasswordHash() ([]byte, error)
- func (c *Config) GetToken() (LoginToken, error)
- func (c *Config) GetUserSymmetricKey() ([]byte, error)
- func (c *Config) HasPin() bool
- func (c *Config) IsLocked() bool
- func (c *Config) IsLoggedIn() bool
- func (c *Config) Lock()
- func (c *Config) Purge()
- func (c *Config) SetClientID(clientID string) error
- func (c *Config) SetClientSecret(clientSecret string) error
- func (c *Config) SetMasterKey(key []byte) error
- func (c *Config) SetMasterPasswordHash(hash []byte) error
- func (c *Config) SetToken(token LoginToken) error
- func (c *Config) SetUserSymmetricKey(key []byte) error
- func (cfg *Config) TryUnlock(vault *vault.Vault) error
- func (c *Config) Unlock(password string) bool
- func (c *Config) UpdatePin(password string, write bool)
- func (c *Config) VerifyPin(password string) bool
- func (config *Config) WriteConfig() error
- type ConfigFile
- type LockedBuffer
- type LoginToken
- type MemGuardLockedBuffer
- type MemoryLockedBuffer
- type RuntimeConfig
Constants ¶
View Source
const ( KDFIterations = 2 KDFMemory = 2 * 1024 * 1024 KDFThreads = 8 DefaultConfigPath = "~/.config/goldwarden/goldwarden.json" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { ConfigFile ConfigFile // contains filtered or unexported fields }
func DefaultConfig ¶
func ReadConfig ¶
func ReadConfig(rtCfg RuntimeConfig) (Config, error)
func (*Config) GetClientID ¶
func (*Config) GetClientSecret ¶
func (*Config) GetMasterKey ¶
func (*Config) GetMasterPasswordHash ¶
func (*Config) GetToken ¶
func (c *Config) GetToken() (LoginToken, error)
func (*Config) GetUserSymmetricKey ¶
func (*Config) IsLoggedIn ¶
func (*Config) SetClientID ¶
func (*Config) SetClientSecret ¶
func (*Config) SetMasterKey ¶
func (*Config) SetMasterPasswordHash ¶
func (*Config) SetToken ¶
func (c *Config) SetToken(token LoginToken) error
func (*Config) SetUserSymmetricKey ¶
func (*Config) WriteConfig ¶
type ConfigFile ¶
type ConfigFile struct { IdentityUrl string ApiUrl string NotificationsUrl string VaultUrl string EncryptedClientID string EncryptedClientSecret string DeviceUUID string ConfigKeyHash string EncryptedToken string EncryptedUserSymmetricKey string EncryptedMasterPasswordHash string EncryptedMasterKey string RuntimeConfig RuntimeConfig `json:"-"` }
type LockedBuffer ¶
type LockedBuffer interface { Bytes() []byte Wipe() }
func NewBuffer ¶
func NewBuffer(size int, useMemguard bool) LockedBuffer
func NewBufferFromBytes ¶
func NewBufferFromBytes(bytes []byte, useMemguard bool) LockedBuffer
type LoginToken ¶
type MemGuardLockedBuffer ¶
type MemGuardLockedBuffer struct {
// contains filtered or unexported fields
}
func (MemGuardLockedBuffer) Bytes ¶
func (b MemGuardLockedBuffer) Bytes() []byte
func (MemGuardLockedBuffer) Wipe ¶
func (b MemGuardLockedBuffer) Wipe()
type MemoryLockedBuffer ¶
type MemoryLockedBuffer struct {
// contains filtered or unexported fields
}
func (MemoryLockedBuffer) Bytes ¶
func (b MemoryLockedBuffer) Bytes() []byte
func (MemoryLockedBuffer) Wipe ¶
func (b MemoryLockedBuffer) Wipe()
type RuntimeConfig ¶
Click to show internal directories.
Click to hide internal directories.