<kbd id="afajh"><form id="afajh"></form></kbd>
<strong id="afajh"><dl id="afajh"></dl></strong>
    <del id="afajh"><form id="afajh"></form></del>
        1. <th id="afajh"><progress id="afajh"></progress></th>
          <b id="afajh"><abbr id="afajh"></abbr></b>
          <th id="afajh"><progress id="afajh"></progress></th>

          ElixisC#加密庫(kù)

          聯(lián)合創(chuàng)作 · 2023-09-30 08:22

          Elixis 是一個(gè)C#的加密啊庫(kù),支持 AES、TripleDES和MD5 算法的加密和解密(MD5是單向的),而且更多加密的算法還在進(jìn)一步開(kāi)發(fā)中。

          示例代碼:

          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();
          }

          瀏覽 28
          點(diǎn)贊
          評(píng)論
          收藏
          分享

          手機(jī)掃一掃分享

          編輯 分享
          舉報(bào)
          評(píng)論
          圖片
          表情
          推薦
          點(diǎn)贊
          評(píng)論
          收藏
          分享

          手機(jī)掃一掃分享

          編輯 分享
          舉報(bào)
          <kbd id="afajh"><form id="afajh"></form></kbd>
          <strong id="afajh"><dl id="afajh"></dl></strong>
            <del id="afajh"><form id="afajh"></form></del>
                1. <th id="afajh"><progress id="afajh"></progress></th>
                  <b id="afajh"><abbr id="afajh"></abbr></b>
                  <th id="afajh"><progress id="afajh"></progress></th>
                  午夜性爱福利 | 奇米成人| 欧美成人精品一区二区综合免费 | 草逼伊人网站着的 | 中文字幕www |