Documentation ¶
Index ¶
- func Compress(input string, output string) error
- func Decompress(input string, output string) error
- func Decrypt(input string, output string, password string) error
- func Encrypt(input string, output string, password string) error
- func PackFolder(input string, output string) error
- func Unpack(input string, output string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Compress ¶
Compress compress input file into output path. ".gz" extension is added to output.
If output == "" then generated file is saved in current directory.
Example: Compress("folder1/myfile.tar", "") generates "./myfile.tar.gz"
func Decompress ¶
Decompress decompress input file into output path.
If output == "" then uses current directory.
Example: Decompress("projects.gz", "user/projectsfolder")
func Decrypt ¶
Decrypt decrypts input file into output path using the password. This function uses AES256 algorithm (mode GCM).
Input file must have the extension ".crp"
If output == "" then uses current directory.
Example: Decrypt("projects.tar.gz.crp", "") generates "./projects.tar.gz"
func Encrypt ¶
Encrypt encrypts input file into output path using the password. This function uses AES256 algorithm (mode GCM).
Password lenght can be any not zero value. The password is processed by the SHA256 hash algorithm to generate a 256-bit key.
If output == "" then uses current directory.
Example: Encrypt("projects.tar.gz", "") generates "./projects.tar.gz.crp"
func PackFolder ¶
PackFolder packs input folder into output tar file. ".tar" extension is added to the output file name.
Example: PackFolder("user/projectsfolder", "projects") generates "./projects.tar"
Types ¶
This section is empty.