encryption

package
v0.0.0-...-1a6bc1e Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2017 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Encrypted bool
)

Functions

func Decrypt

func Decrypt(data []byte) error

Decrypt decrypts the given data in place

func Encrypt

func Encrypt(data []byte) error

Encrypt encrypts the given data in place

func GenerateAESCipherBlock

func GenerateAESCipherBlock(key []byte) (cipherBlock cipher.Block, err error)

GenerateAEScipherBlock generates the cipher used for encryption and decryption of data It takes in a byte array key and returns an error if the key is not of size 16, 24 or 32 or when the cipher failed to initialize.

func GetCipherSize

func GetCipherSize() int

func LastBlockSize

func LastBlockSize(r *os.File) (size int, err error)

LastBlockSize reads the size of the last block from the beginning of the file

func SetCipher

func SetCipher(cb cipher.Block)

SetCipher sets a cipher to be used for data encyption and decryption

Types

This section is empty.

Jump to

Keyboard shortcuts

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