Ejemplo n.º 1
0
        /// <summary></summary>
        /// <param name=""></param>
        private void ExecutePasswordToKey(BackgroundMessage UserInterfaceMessage)
        {
            byte[] abKey;

            if ((UserInterfaceMessage.abKeyOrPassword == null) || (UserInterfaceMessage.abSignatureOrSalt == null))
            {
                throw new ArgumentException("Argument in BackgroundThread.ExecutePasswordToKey must not be null.");
            }
            else
            {
                Console.WriteLine("ExecutePasswordToKey start " + DateTime.Now.ToString("mm:ss fff"));
                abKey = _Cryptography.PasswordToAesKey(_Cryptography.DecryptAes(UserInterfaceMessage.abKeyOrPassword, _abAesKey), UserInterfaceMessage.abSignatureOrSalt);
                Console.WriteLine("ExecutePasswordToKey end " + DateTime.Now.ToString("mm:ss fff"));
                UserInterfaceMessage.abKeyOrPassword = _Cryptography.EncryptAes(abKey, _abAesKey);
            }
            _quReturn.Enqueue(UserInterfaceMessage);
        }