All Downloads are FREE. Search and download functionalities are using the official Maven repository.

edu.vt.middleware.crypt.asymmetric.AsymmetricCli.examples Maven / Gradle / Ivy

There is a newer version: 2.2
Show newest version
- 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