Skip to content

Releases: angelsolaorbaiceta/angel-archives

Encrypt/Decrypt commands

05 Sep 16:42
2787c37
Compare
Choose a tag to compare

Summary

Two new commands are added:

  • encrypt
  • decrypt

These commands are used to encrypt and decrypt archive files respectively.
They only work with angel archives by checking the passed in file magic.

Encrypted archives have the "AARX" file magic.

Example

Let's say you have an archive.aarch file with two files in it:

$ aar list -f archive.aarch

Archive has the following files:
> fib.go (Offset: 45 bytes, Compressed size: 332 bytes)
> photo.jpg (Offset: 377 bytes, Compressed size: 53852 bytes)

To encrypt it:

$ aar encrypt -f archive.aarch
Password: <enter a password>
Confirm password: <enter the same password>

Archive encrypted successfully to archive.aarch.enc

This removes the archive.aarch file and creates the encrypted version in its place: archive.aarch.enc.

To decrypt it:

$ aar decrypt -f archive.aarch.enc
Password: <enter a password>
Confirm password: <enter the same password>

Archive decrypted successfully to archive.aarch

This removes the encrypted file and brings back the original archive.aarch file.

Use commands instead of flags

04 Sep 15:44
bc88c95
Compare
Choose a tag to compare

Summary

Use commands instead of flags.
The available commands:

  • create: Instead of -c, to create archives
  • list: Instead of -l, to list files inside an archive
  • extract: Instead of -x, to extract files

v0.1.0

03 Sep 10:50
c253fdf
Compare
Choose a tag to compare

Initial release.

Usage

Creating an archive:

$ aar -c -f archive.aarch file1.txt file2.txt file3.txt

Extracting all files an archive:

$ aar -x -f archive.aarch

Extracting a single file by name from an archive:

$ aar -x -f archive.aarch -n file2.txt

Listing the contents of an archive:

$ aar -l -f archive.aarch