Encrypt text (AES-256-GCM)
crypto_text_encryptEncrypt text or UTF-8 files with a password using AES-256-GCM and PBKDF2-SHA256, producing a portable S3E1 base64 line for decryption on the companion website or decrypt tool.
Instructions
Encrypt a message with a password: AES-256-GCM, key from PBKDF2-SHA256 (600,000 rounds, random 16-byte salt, 12-byte IV), output as one "S3E1.…" base64 line. Exactly the website's format, so the result can be decrypted at https://s3eidat.github.io/text-encrypt/ or with crypto_text_decrypt. Each run gives a different output. Web version: https://s3eidat.github.io/text-encrypt/
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Or: a UTF-8 text file to encrypt. | |
| text | No | The message to encrypt. | |
| output | No | Optional: also save the encrypted line to this file (website "Save" gives encrypted.txt). | |
| password | Yes | The password. Normalised to Unicode NFC first, like the website. | |
| iterations | No | PBKDF2 rounds (website: 600,000). |