crypt

package
v0.0.0-...-5016189 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2017 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decrypt

func Decrypt(path string, passphrase []byte) (string, string, error)

encrypted file is encoded in hex and has the following structure: first 24 bytes = nonce last line = salt

func Encrypt

func Encrypt(path string, passphrase []byte) (string, string, error)

scrypt derives a 64 bytes key based from the passphrase if its provided or randomly generates a passphrase if its not provided. uses nacl box to encrypt the data using derived scrypt key

Types

This section is empty.

Jump to

Keyboard shortcuts

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