public void Decrypt2_Test()
        {
            var key    = new KeySinglePermutation.Key(3, "СКАНЕР");
            var output = new KeySinglePermutation.Output("Й ЕРЕС ИМОНИПЗНЛЕСАМЫЬНТ", key);
            var input  = Method.Decrypt(output);

            Assert.AreEqual("СИСТЕМНЫЙ ПАРОЛЬ ИЗМЕНЕН", input.Value);
        }
        public void Decrypt1_Test()
        {
            var key    = new KeySinglePermutation.Key(3, "ПАМИР");
            var output = new KeySinglePermutation.Output("ГРДВББАЕРИУЗТАТ", key);
            var input  = Method.Decrypt(output);

            Assert.AreEqual("ВРАГБУДЕТРАЗБИТ", input.Value);
        }
        public IActionResult DecryptKeySinglePermutation([FromBody] KeySinglePermutationModel.OutputModel outputModel)
        {
            var method = new KeySinglePermutation();
            var key    = new KeySinglePermutation.Key(outputModel.Key.RowCount, outputModel.Key.KeyWord);
            var output = new KeySinglePermutation.Output(outputModel.Value, key);
            var input  = method.Decrypt(output);

            var result = new KeySinglePermutationModel()
            {
                Input = new KeySinglePermutationModel.InputModel()
                {
                    Key   = outputModel.Key,
                    Value = input.Value
                },
                Output = outputModel
            };

            return(View("KeySingleProtection", result));
        }