コード例 #1
0
 private void RunSingleMbedTLSEncryptionThread()
 {
     try
     {
         for (int i = 0; i < 100; i++)
         {
             IEncryptor encryptor;
             IEncryptor decryptor;
             encryptor = new MbedTLSEncryptor("aes-256-cfb", "barfoo!", false, false);
             decryptor = new MbedTLSEncryptor("aes-256-cfb", "barfoo!", false, false);
             RunEncryptionRound(encryptor, decryptor);
         }
     }
     catch
     {
         encryptionFailed = true;
         throw;
     }
 }
コード例 #2
0
 private void RunSingleRC4EncryptionThread()
 {
     try
     {
         for (int i = 0; i < 100; i++)
         {
             var        random = new Random();
             IEncryptor encryptor;
             IEncryptor decryptor;
             encryptor = new MbedTLSEncryptor("rc4-md5", "barfoo!", false, false);
             decryptor = new MbedTLSEncryptor("rc4-md5", "barfoo!", false, false);
             RunEncryptionRound(encryptor, decryptor);
         }
     }
     catch
     {
         encryptionFailed = true;
         throw;
     }
 }