lib

package
v0.0.0-...-be01b3c Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2017 License: ISC Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const Version uint32 = 1

Variables

This section is empty.

Functions

func CommandList

func CommandList(mapped, short bool)

func CommandRead

func CommandRead(fileName string)

func CommandUnlock

func CommandUnlock()

func CommandWrite

func CommandWrite(fileName string)

func ConfigWrite

func ConfigWrite(configDir string, config Config, nonce, key, salt []byte)

func Decrypt

func Decrypt(ciphertext, nonce, key []byte) ([]byte, error)

func DecryptFile

func DecryptFile(path string, password []byte) (cleartext, nonce, key, salt []byte)

func Encrypt

func Encrypt(cleartext, nonce, key []byte) ([]byte, error)

func EncryptFile

func EncryptFile(path string, cleartext, nonce, key, salt []byte)

func NewKey

func NewKey(salt, password []byte) []byte

func NewNonce

func NewNonce() []byte

func RandomString

func RandomString(length int, complete, noNumber, noSpecial bool) string

func VersionedJoin

func VersionedJoin(in ...[]byte) []byte

func VersionedSplit

func VersionedSplit(in []byte) (version uint32, ciphertext, nonce, salt []byte, err error)

Types

type Config

type Config struct {
	Files map[string]string `json:"files"`
}

func ConfigRead

func ConfigRead(configDir string, password []byte) (config Config, nonce, key, salt []byte)

Jump to

Keyboard shortcuts

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