edu.vt.middleware.crypt.asymmetric.AsymmetricCli.examples Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of vt-crypt Show documentation
Show all versions of vt-crypt Show documentation
Library for performing common cryptographic operations
- Generate a 2048-bit RSA public/private key pair as DER-encoded files
pkc -cipher RSA -genkeys 2048 -out rsa-pub-key.der -privkey rsa-priv-key.der
- Encrypt a file to base-64-encoded ciphertext
pkc -cipher RSA -encrypt path/to/rsa-pub-key.der -encoding base64 \
-in path/to/plain.txt -out path/to/cipher.txt
- Decrypt a base-64-encoded ciphertext file with a PEM-encoded private key
(PEM-encoded key is determined by .pem file extension)
pkc -cipher RSA -decrypt path/to/rsa-priv-key.pem -encoding base64 \
-in path/to/cipher.txt -out path/to/plain.txt
© 2015 - 2025 Weber Informatics LLC | Privacy Policy