envcrypt
Drop-in replacement for env!
that encrypts your variables at compile-time and decrypts them at runtime,
preventing naughty folks from snooping your binary for secrets or credentials.
Usage
use envcrypt;
With dotenv
:
.env
:
CLIENT_SECRET="my_client_secret"
SOME_TOKEN="some_token"
build.rs
:
main.rs
:
use envcrypt;
Details
Encryption is powered by MagicCrypt
using AES-256 encryption.