dcrypto概括包装openssl库以启用简单的双向加密。
例子
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 a decrypted string \");
auto encrypted2 = encryptor.encrypt(\" Another decrypted string \");
暂无评论