ncxcy/HashPee ? reverse-engineered prompt

Reverse engineered prompt

Build me a simple command line file encryption tool in C that feels like a small, practical utility. I want two commands, one to encrypt a file and one to decrypt it, using a passphrase so the user can lock and unlock a single file at a time.

Please use strong, modern crypto through libsodium, with a slow key derivation step from the passphrase and authenticated encryption so tampering makes decryption fail cleanly. The encrypted file should include whatever it needs to work later, like a magic header, salt, and nonce, and it should prompt for the passphrase in a way that does not show what I type.

Keep the workflow simple, with clear success and failure messages, and make sure decrypting with the wrong passphrase does not write a broken output file. I only need file by file support for now, not folders or streaming, and it is fine if the whole file is handled in memory. If you need to check current libsodium usage details, look up the docs online.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab