everglade

package module
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2022 License: Apache-2.0 Imports: 6 Imported by: 1

README

Everglade Go Report Card GoDoc

An encryption framework

Overview

Everglade handles file discovery and encryption with ease.

Directory Enumeration

Everglade has the capability to:

  1. Recursively map directories
  2. Search a directory recursively for a file
  3. Search a directory recursively for all files of a given type

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func DiscoverFilesInDirectory

func DiscoverFilesInDirectory(dir string) ([]string, error)

DiscoverFilesInDirectory automates discovery of files in directory and returns []string

func FindFileInDirectory

func FindFileInDirectory(dir, fn string) (string, error)

FindFileInDirectory takes a directory and a filename and returns the relative path of that file if exists

func FindFilesByTypeInDirectory

func FindFilesByTypeInDirectory(dir, ex string) ([]string, error)

FindFilesByTypeInDirectory returns the path of all files in the directory of a specific extension

func Hash added in v1.3.1

func Hash(pt []byte) []byte

Types

type Everglade added in v1.3.1

type Everglade struct {
	Blind  blind.Blind
	Paths  []string
	Layers int
}

func New

func New(l int) (*Everglade, error)

func (*Everglade) Add added in v1.3.1

func (e *Everglade) Add(path string) error

func (*Everglade) Decrypt added in v1.3.1

func (e *Everglade) Decrypt() error

func (*Everglade) Encrypt added in v1.3.1

func (e *Everglade) Encrypt() error
Example
// File to encrypt in this test
fn := "everglade.go"

// e.blind houses your keys and can be exported to/from if needed.
e, err := New(1)
if err != nil {
	panic(err)
}

// Add the files to encrypt to this list
err = e.Add(fn)
if err != nil {
	panic(err)
}

// Encrypt the files that were added with AES-CBC-128.
// This includes a random nonce and IV.
err = e.Encrypt()
if err != nil {
	panic(err)
}
Output:

func (*Everglade) Sign added in v1.3.1

func (e *Everglade) Sign() ([]Signature, error)

func (*Everglade) Verify added in v1.3.1

func (e *Everglade) Verify(sig, pt []byte) bool

type Signature added in v1.3.1

type Signature []byte

Jump to

Keyboard shortcuts

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