Beispiel #1
0
 public void SetFinanceKey(string financeKey)
 {
     if (FinanceKeyIsEntered && FinanceKeyIsNeeded)
         _tripleDesProvider = new TripleDesProvider(financeKey);
 }
Beispiel #2
0
 /// <summary>
 /// Could have been done better with mapping, but decided to go with this route so you 
 /// can get a more text like selection in code.
 /// </summary>
 /// <param name="ciphermode">TripleDES.CipherMode value mapped to the corresponding 
 /// System.Security.Cryptography.CipherMode</param>
 /// <returns>System.Security.Cryptography.CipherMode that matches the selected 
 /// TripleDES.CipherMode</returns>
 private System.Security.Cryptography.CipherMode TranslateCipherMode(TripleDesProvider.CipherMode ciphermode)
 {
     return (System.Security.Cryptography.CipherMode)Convert.ToInt32(ciphermode);
 }
Beispiel #3
0
 public void ReSetFinanceKey(string financeKey)
 {
     if(string.IsNullOrEmpty(financeKey))
     {
         FinanceKeyIsNeeded = false;
         FinanceKeyIsEntered = false;
         return;
     }
     FinanceKeyIsNeeded = true;
     FinanceKeyIsEntered = true;
     _tripleDesProvider = new TripleDesProvider(financeKey);
 }