store

package
v0.2.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CryptStore

type CryptStore struct {
	*creds.Crypt
	// contains filtered or unexported fields
}

CryptStore represents a crypt instance stored as a file

func Decrypt

func Decrypt(path, pwd string) (*CryptStore, error)

Decrypt attempts to decrypt a crypt store at the given path

func InitDefaultStore

func InitDefaultStore(path, pwd string) (*CryptStore, error)

InitDefaultStore initializes a default crypt store using the AES crypto implementation. If the crypt file does not exist, one will be created in the provided path.

func (*CryptStore) ChangePwd

func (s *CryptStore) ChangePwd(pwd string) error

ChangePwd recreates the Crypto instance with the new password.

func (*CryptStore) Save

func (s *CryptStore) Save() error

Save encrypts the current Crypt and saves it to the path field.

Jump to

Keyboard shortcuts

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