C#加密库 Elixis

码农软件 · 软件分类 · 加密/解密软件包 · 2019-10-01 09:27:42

软件介绍

Elixis 是一个C#的加密啊库,支持 AES、TripleDES和MD5 算法的加密和解密(MD5是单向的),而且更多加密的算法还在进一步开发中。

示例代码:

private static AESEncryptor fAESEncryptor = new AESEncryptor("My Password", AESBits.BITS256);
private static TripleDESEncryptor fTripleDESEncryptor = new TripleDESEncryptor("My Password");
private static MD5Encryptor fMD5Encryptor = new MD5Encryptor();
 
static void Main(string[] args)
{
    string originalText = "Hello! This is Elixis...";
 
    Console.WriteLine("AES Encryption n ");
 
    // Encrypt with AES.
    string encryptedAESString = fAESEncryptor.Encrypt(originalText);
    Console.WriteLine("Encrypted AES: " + encryptedAESString);
 
    // Decrypt with AES.
    string decryptedAESString = fAESEncryptor.Decrypt(encryptedAESString);
    Console.WriteLine("Decrypted AES: " + decryptedAESString);
 
    Console.WriteLine("nnTripleDES Encryption n ");
 
    // Encrypt with TripleDES.
    byte[] tripleDESEncryptedString = fTripleDESEncryptor.Encrypt(Encoding.ASCII.GetBytes(originalText));
    Console.WriteLine("Encrypted TripleDES: " + Encoding.Default.GetString(tripleDESEncryptedString));
 
    // Decrypt with TripleDES.
    byte[] tripleDESDecryptedString = fTripleDESEncryptor.Decrypt(tripleDESEncryptedString);
    Console.WriteLine("Decrypted TripleDES: " + Encoding.Default.GetString(tripleDESDecryptedString));
 
    Console.WriteLine("nnMD5 Encryption n ");
 
    // Encrypt with MD5.
    string md5 = fMD5Encryptor.GetMD5(originalText);
    Console.WriteLine("MD5: " + md5);
 
    string md5_bytes = fMD5Encryptor.GetMD5(Encoding.ASCII.GetBytes(originalText));
    Console.WriteLine("MD5_bytes: " + md5_bytes);
 
    Console.Read();
}

本文地址:https://codercto.com/soft/d/15786.html

R语言实战

R语言实战

卡巴科弗 (Robert I.Kabacoff) / 高涛、肖楠、陈钢 / 人民邮电出版社 / 2013-1 / 79.00元

数据时代已经到来,但数据分析、数据挖掘人才却十分短缺。由于“大数据”对每个领域的决定性影响, 相对于经验和直觉,在商业、经济及其他领域中基于数据和分析去发现问题并作出科学、客观的决策越来越重要。开源软件R是世界上最流行的数据分析、统计计算及制图语言,几乎能够完成任何数据处理任务,可安装并运行于所有主流平台,为我们提供了成千上万的专业模块和实用工具,是从大数据中获取有用信息的绝佳工具。  本书从解决......一起来看看 《R语言实战》 这本书的介绍吧!

HTML 压缩/解压工具
HTML 压缩/解压工具

在线压缩/解压 HTML 代码

URL 编码/解码
URL 编码/解码

URL 编码/解码

html转js在线工具
html转js在线工具

html转js在线工具