crypto

package
v0.0.0-...-3e40f46 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2017 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decrypt

func Decrypt(cyphertext, key []byte) ([]byte, error)

decrypt decrypts the passed in data. The data is expected to be in the format {{nonce}}{{null}}{{null}}{{ciphertext}}

func Encrypt

func Encrypt(data, key []byte) ([]byte, error)

encrypt encrypts the data using aes. Note that the key must be 16 or 32 bytes. the output is in this format {{nonce}}{{null}}{{null}}{{ciphertext}}

func GenerateKey

func GenerateKey(password, salt []byte, pow uint) ([]byte, error)

generateKey uses a key derivation function to create an key for use in aes encryption.

Types

This section is empty.

Jump to

Keyboard shortcuts

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