Local AES-256-GCM encryption provider for the aux4/encrypter facade. It registers the aux4 provider, so aux4 encrypter encrypt/decrypt work out of the box with no external services.
Installing this package pulls in aux4/encrypter automatically via dependencies.
aux4 aux4 pkger install aux4/encrypter-aux4
Through the facade (recommended — aux4 is the default provider):
SECRET=$(aux4 encrypter generate-secret)
echo -n 'hello world' | aux4 encrypter encrypt --secret "$SECRET"
# -> base64 ciphertext
echo -n '<base64>' | aux4 encrypter decrypt --secret "$SECRET"
# -> hello world
Directly (explicit provider path):
echo -n 'hello world' | aux4 encrypter provider aux4 encrypt --secret "$SECRET"
aux4 encrypter provider aux4 decrypt --secret "$SECRET" '<base64>'
--secret value is hashed with SHA-256 to a 256-bit key. Any secret length is accepted — unlike raw AES, which requires exactly 16/24/32 bytes. This is the robust choice and means a generate-secret of any length works as a key.--iv parameter.The emitted value is plain base64 with no prefix:
base64( versionByte(1) ‖ nonce(12) ‖ ciphertext‖tag )
The single internal versionByte (currently 0x01) is invisible in the base64 output; it lets a future format change be detected on decrypt without changing the value's shape. There is no --iv and no human-visible aux4enc: prefix.
| Command | Description | |---------|-------------| | encrypt | Encrypt plaintext (positional arg or stdin) → base64 on stdout | | decrypt | Decrypt base64 (positional arg or stdin) → plaintext on stdout | | generate-secret | Generate a random alphanumeric secret (default length 32) |
These implement the Provider Command Contract defined by aux4/encrypter, under the encrypter:provider:aux4 profile.
| Variable | Description | |----------|-------------| | AUX4_SECRET | Fallback for --secret (the AES key material) |