operation

package
v0.0.0-...-57e9fdd Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2016 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package operation is for agent file/folder encryption/decryption. It is the core for blackbox agent side program.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AesDecryptFile

func AesDecryptFile(cipherdata []byte,
	hash []byte,
	key []byte,
	opath string) error

Decrypt a single file, write output to opath.

func AesDecryptFileAuto

func AesDecryptFileAuto(arg cli.Args, path string) error

A wrapper of AesDecryptFile, including get file hash and connects to blackbox server for getting encryption key.

func AesDecryptFolderAuto

func AesDecryptFolderAuto(arg cli.Args, path string) error

Recursively decrypt files within the root directory.

func AesEncryptFile

func AesEncryptFile(filedata []byte,
	hash [16]byte,
	key []byte,
	opath string) error

Encrypt a single file, write output to opath.

func AesEncryptFileAuto

func AesEncryptFileAuto(arg cli.Args, path string) error

A wrapper of AesDecryptFile, including calculate file hash and connects to blackbox server for getting encryption key.

func AesEncryptFolderAuto

func AesEncryptFolderAuto(arg cli.Args, path string) error

Recursively encrypt files within the root directory.

Types

type PlainFile

type PlainFile struct {
	Path string
	MD5  string
}

type PlainFolder

type PlainFolder struct {
	Files []PlainFile
}

Jump to

Keyboard shortcuts

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