Esempio n. 1
0
        public uint GetCustomerID(string serial)
        {
            ulong serialEncrypted = _translation.TranslateString(serial);
            ulong serialTemp      = _algorithm.Decrypt(serialEncrypted);

            return(_serial.GetCustomerID(serialTemp));
        }
Esempio n. 2
0
        public string DecryptMessage(string message)
        {
            string result = "";

            for (int i = 0; i < message.Length - 1; i = i + (int)EMessageSplit.Char_Bits)
            {
                string substring = message.Substring(i, (int)EMessageSplit.Char_Bits);
                T      val       = _translation.TranslateString(substring);
                result += _messageHandler.MakeSubmessageFromT(_cipherAlgorithm.Decrypt(val));
            }
            return(result);
        }
Esempio n. 3
0
 /// <summary>
 /// Creates decrypted data stored in <see cref="byte"/>[] using the specified symmetric algorithm.
 /// </summary>
 /// <param name="algorithm">Algorithm used for decryption of data.</param>
 /// <returns>Decrypted data.</returns>
 public byte[] Decrypt(IAlgorithm algorithm)
 {
     return(algorithm.Decrypt(EncryptedData));
 }