Versions in this module Expand all Collapse all v0 v0.0.1 Jul 8, 2018 v0.0.0 Jul 8, 2018 Changes in this version + const Aes256BlockSize + const Extension + const MaxVersion + const MinVersion + const NonceSize + const SaltSize + const SignatureSize + const Version + func GenerateKey(phrase, salt []byte, blockSize uint32) []byte + func NewSalt(saltSize int) (salt []byte, n int, err error) + func ReadAndConfirmPhrase(retries uint32) (phrase []byte, err error) + func ReadPhrase(printLabel bool) ([]byte, error) + func SetExtension(ext string) option + func SignatureHeader() [8]byte + func ValidateMetadata(signature [8]byte, vsbn [4]byte, reserved [20]byte) error + type Cipher struct + func NewCipher(blockSize, nonceSize int, key []byte) (*Cipher, error) + func (c *Cipher) BlockSize() int + func (c *Cipher) Decrypt(nonce, ciphertext []byte) (plaintext []byte, err error) + func (c *Cipher) Encrypt(plaintext, additionalData []byte) (nonce, ciphertext []byte, err error) + func (c *Cipher) NonceSize() int + type Decrypter struct + func NewDecrypter() *Decrypter + func (c *Decrypter) BlockSize() int + func (c *Decrypter) Config(opts ...option) + func (c *Decrypter) GetDecryptedFileName(f *os.File) string + func (c *Decrypter) GetEncryptedFileName(f *os.File) string + func (c *Decrypter) IsReady() bool + func (c *Decrypter) Nonce() []byte + func (c *Decrypter) NonceSize() int + func (c *Decrypter) Salt() []byte + func (c *Decrypter) SaltSize() int + func (c *Decrypter) Wipe() + func (d *Decrypter) Decode(r io.Reader) (n int, err error) + func (d *Decrypter) Decrypt(secretPhrase []byte) (plaintext []byte, err error) + func (d *Decrypter) DecryptFile(secretPhrase []byte, name string, overwrite, removeSource bool) (decryptedFileName string, err error) + func (d *Decrypter) DecryptMultipleFiles(secretPhrase []byte, fileNames []string, overwrite, removeSource bool) (decryptedFileNames []string, errs []error) + func (d *Decrypter) Init(secretPhrase, salt, nonce, ciphertext []byte) error + func (d *Decrypter) Read(r io.Reader) (n int, err error) + type Encrypter struct + func NewEncrypter() *Encrypter + func (c *Encrypter) BlockSize() int + func (c *Encrypter) Config(opts ...option) + func (c *Encrypter) GetDecryptedFileName(f *os.File) string + func (c *Encrypter) GetEncryptedFileName(f *os.File) string + func (c *Encrypter) IsReady() bool + func (c *Encrypter) Nonce() []byte + func (c *Encrypter) NonceSize() int + func (c *Encrypter) Salt() []byte + func (c *Encrypter) SaltSize() int + func (c *Encrypter) Wipe() + func (e *Encrypter) Encode(w io.Writer) (n int, err error) + func (e *Encrypter) Encrypt(secretPhrase []byte, plaintext []byte) (ciphertext []byte, err error) + func (e *Encrypter) EncryptFile(secretPhrase []byte, name string, overwrite, removeSource bool) (encryptedName string, err error) + func (e *Encrypter) EncryptMultipleFiles(secretPhrase []byte, fileNames []string, overwrite, removeSource bool) (encryptedFileNames []string, errs []error) + func (e *Encrypter) Init(secretPhrase []byte) (err error) + func (e *Encrypter) Write(w io.Writer) (n int, err error) + type Metadata struct + func DecodeMetadata(r io.Reader) (m *Metadata, n int, err error) + func (m *Metadata) Bytes() []byte + func (m *Metadata) Size() int + func (m *Metadata) Verify(b []byte) bool