dcrypto 1.0.0

Wraps the openssl library to enable easy two way encryption.


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:

= dcrypto

== Summary

Wraps the openssl library to enable easy two way encryption.

== Example

import dcrypto.evp;

// Create an AES key
auto key = keyFromSecret("ZYXWVUTSRQPONMLKJIHGFEDCBA", "SALT");

// Create an encryptor class based on the key.
auto encryptor = new EVPEncryptor(key);

// An encryptor class can be used to encrypt more than one string.
auto encrypted = encryptor.encrypt("This is a decrypted string");
auto encrypted2 = encryptor.encrypt("This is a second decrypted string");

// Create a decryption class based on the key.
auto decryptor = new EVPDecryptor(key);

assert(decryptor.decrypt(encrypted2) == "This is a second decrypted string");
assert(decryptor.decrypt(encrypted) == "This is a decrypted string");
assert(decryptor.decrypt(encrypted2) == "This is a second decrypted string");
Authors:
  • David Monagle
Dependencies:
openssl
Versions:
1.2.2 2014-Dec-16
1.2.1 2014-Oct-09
1.2.0 2014-Sep-26
1.1.1 2014-Sep-18
1.1.0 2014-Aug-05
Show all 6 versions
Download Stats:
  • 0 downloads today

  • 3 downloads this week

  • 15 downloads this month

  • 8640 downloads total

Score:
1.8
Short URL:
dcrypto.dub.pm