smimeasym 1.0.1

A wrapper around openssl's S/MIME asymmetrical encryption, that is compatible with the openssl cli

To use this package, run the following command in your project's root directory:

Manual usage
Put the following dependency into your project's dependences section:

smimeasym S/MIME asymmetrical encryption


So the problem to solve is that I needed a function that encrypts an array of ubytes with multiple public keys. The resulting, encrypted, array of bytes, when saved to a file, should be decrypted-able by any private key matching any of the used public key. This should be possible with the openssl cli.


There are two main functions

ubyte[] smimeEncryption(ubyte[] buf, string[] publicKeyFilenames);

ubyte[] smimeDecryption(ubyte[] buf, string privateKeyFilename);

X509* loadCert(string filename);

ubyte[] smimeEncryptionWithCerts(ubyte[] buf, X509*[] certs);

The opencli should be able to decrypt created files from the data from smimeEncryption with the following shell command

openssl smime -decrypt -in secrets.txt.enc -inform PEM -inkey bob.key
  • Robert Schadek
1.0.1 2021-Mar-24
1.0.0 2021-Mar-24
~master 2021-Mar-24
Show all 3 versions
Download Stats:
  • 0 downloads today

  • 0 downloads this week

  • 0 downloads this month

  • 0 downloads total

Short URL: