Ejemplo n.º 1
0
 static MatrixCryptography()
 {
     cryptoMatrix = new double[3, 3] {
         { -3, 8, -5 },
         { 2, -6, 3 },
         { -1, 2, 0 }
     };
     MatrixCryptography.CryptoMatrix  = MatrixCryptography.cryptoMatrix;
     MatrixCryptography.InverseMatrix = MatrixCryptography.CalculateInverseMatrix();
 }
        public static List <double> ProcessLoggedInUserData(User user)
        {
            JObject dataJson = new JObject();

            dataJson["found"] = false;
            if (user != null)
            {
                if (user.AccountType == "consumer")
                {
                    Consumer consumer = (Consumer)user;
                    dataJson = consumer.ToJson();
                }
                dataJson["found"] = true;
                Output.ShowLog(dataJson);
            }
            return(MatrixCryptography.Encrypt(dataJson.ToString()));
        }