enc

enc encrypts and decrypts files with authenticated ciphers, hidden password input or exact keys, and can inspect an encrypted header without decrypting the payload.

SecurityVersion 1.1.4Stable
lil-terminal

Overview

Use enc when file contents need confidentiality and tamper detection. Password mode derives a key interactively; -k and -K use an exact key for controlled automation, while -f and -w make replacement behavior explicit.

Encryption is only as useful as key handling

Authenticated decryption validates the header and authentication tag before writing the result. Keep the password or exact key separate from the encrypted file, prefer hidden input for passwords, and use -w only when replacing the source file is genuinely intended.

Syntax

lil-terminal
enc · enc -info <file> · enc <src> [dst] [options]

Reference

enc

list authenticated ciphers supported by this server

enc -info <file>

show an encrypted-file header without decrypting

enc <src>

encrypt into <src>.enc through a hidden password prompt

enc <src> <dst>

encrypt into a destination file or directory

enc <src> -d

decrypt and remove .enc from the default output name

-k <hex>

use an exact hexadecimal key instead of a password

-K <file>

use an exact raw or hexadecimal key file

-a <cipher>

select an authenticated cipher; default aes-256-gcm

-i <n>

set PBKDF2 iterations; default 310000

-f

replace an existing destination

-w

replace the source file with the result

Result view

After encryption or decryption, enc shows the same compact flat directory listing used by cd instead of expanding a recursive tree.

Safety

Authenticated decryption fails before writing when the password, key, header or authentication tag is invalid.

Interactive sandbox preview

Run the prepared examples directly on the page. Their results are prebuilt and shown in the browser; no terminal command is executed on the server.

Encrypt a file, then inspect its header

Install and manage

Install the current compatible version. Choose Base for the complete feature set or Minimum for the reduced package; use upgrade to update a module that is already installed.

Base and Minimum are two packages of the same current module release, not separate command versions.

Base package

Install the complete package with local command reference and every published mode.

install enc
Minimum package

Install the reduced package. Local reference is omitted; help <cmd> -i opens the current server reference.

install enc -m
Exact public version

Install exactly this published version.

install enc -v 1.1.4
Check or update

Ask upgrade to check compatibility and replace the installed block only when needed.

upgrade enc
Remove module

Remove the extension block while leaving the core and unrelated modules intact.

install enc -u

Examples

Examples are copyable command lines, not actions executed by this website. Review paths, permissions and destructive flags before running them on a real project.

Encrypt a file, then inspect its header
cd \sandbox | enc secret.txt -K keys/data.key | enc -info secret.txt.enc
sandbox

Source      sandbox/secret.txt
Saved       sandbox/secret.txt.enc
Key         sandbox/keys/data.key
Cipher      aes-256-gcm

File           sandbox/secret.txt.enc
Format         LENC2
Cipher         aes-256-gcm
Authenticated  yes
Original size  36 B
Mode           0644
List authenticated ciphers supported by this server
enc
aes-128-gcm     aes-192-gcm     aes-256-gcm
chacha20-poly1305
Encrypt into <src>.enc through a hidden password prompt
enc \sandbox\secret.txt
password  ••••••••
Source    sandbox/secret.txt
Saved     sandbox/secret.txt.enc
Cipher    aes-256-gcm
Encrypt into a destination file or directory
enc \sandbox\secret.txt \sandbox\private\
Source  sandbox/secret.txt
Saved   sandbox/private/secret.txt.enc
Cipher  aes-256-gcm
Decrypt and remove .enc from the default output name
enc \sandbox\secret.txt.enc -d -K \sandbox\keys\data.key
Source  sandbox/secret.txt.enc
Saved   sandbox/secret.txt
Cipher  aes-256-gcm
Use an exact hexadecimal key instead of a password
enc \sandbox\data\users.json -k 00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff
Source  sandbox/data/users.json
Saved   sandbox/data/users.json.enc
Key     exact
Cipher  aes-256-gcm
Use an exact raw or hexadecimal key file
enc \sandbox\data\users.json -K \sandbox\keys\data.key
Source  sandbox/data/users.json
Saved   sandbox/data/users.json.enc
Key     sandbox/keys/data.key
Cipher  aes-256-gcm
Select an authenticated cipher; default aes-256-gcm
enc \sandbox\secret.txt -a aes-128-gcm
Source  sandbox/secret.txt
Saved   sandbox/secret.txt.enc
Cipher  aes-128-gcm
Set PBKDF2 iterations; default 310000
enc \sandbox\secret.txt -i 400000
password    ••••••••
Source      sandbox/secret.txt
Saved       sandbox/secret.txt.enc
Cipher      aes-256-gcm
Iterations  400000
Replace an existing destination
enc \sandbox\secret.txt \sandbox\secret.txt.enc -f
Source   sandbox/secret.txt
Saved    sandbox/secret.txt.enc
Replace  explicit
Replace the source file with the result
copy \sandbox\secret.txt \sandbox\tmp\secret.txt | enc \sandbox\tmp\secret.txt -K \sandbox\keys\data.key -w
Source   sandbox/tmp/secret.txt
Saved    sandbox/tmp/secret.txt
Key      sandbox/keys/data.key
Replace  source after successful encryption
Reject a missing source file
enc \sandbox\missing.txt
Source file not found

File used in this example: sandbox/data/sample.txt

The example uses a file or directory from the protected /sandbox/ documentation workspace.

lil-terminal sandbox text file

This file is safe to read, copy, rename, replace, hash and archive.

Related documentation

Current public release

v1.1.42026-08-08

Bare cipher inventory

Bare enc lists authenticated ciphers and post-action output is now a flat directory view.