imagine

package module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package imagine implements logic to encrypt and decrypt files as images.

Index

Examples

Constants

This section is empty.

Variables

View Source
var (
	Prefix  string = "IMG_" // E.g. "IMG_"
	Counter        = 1000   // Any number with a lenght less than 5 will be formatted with leading zeros. E.g. 500 will be formatted to 00500
	Postfix string = ".jpg" // E.g. ".jpg"
)

Encrypted images are named as follows: Prefix + Counter + Postfix, through targetFname.

Functions

func DeImagine

func DeImagine(src, trg, keyFname string) (err error)

DeImagine takes a source folder, target folder and a key to transform the filesin the source folder and create the files in the target folder using the key stored in the keyFname and returns an error.

Example
fmt.Println(imagine.DeImagine(".\\Photos", ".\\Output", "IMG_01000.jpg"))
Output:

func Imagine

func Imagine(dirs []string, trg string) (err error)

Imagine takes a slice of directories and creates images in ImageFolder containing the transformed data from all the files in the directories. In case of errors, the file is skipped and added to the error message returned.

Example
fmt.Println(imagine.Imagine([]string{".\\Test files"}, ".\\Photos"))
Output:

Types

This section is empty.

Jump to

Keyboard shortcuts

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