public RepositoryResponse <CryptoViewModel <JObject> > Decrypt([FromBody] JObject model)
        {
            string data = model.GetValue("data").Value <string>();
            string key  = model.GetValue("key").Value <string>();
            string iv   = model.GetValue("iv").Value <string>();

            return(new RepositoryResponse <CryptoViewModel <JObject> >()
            {
                Data = MixService.DecryptStringFromBytes_Aes(data, key, iv)
            });
        }
        public JObject SaveEncrypt([FromBody] RequestEncrypted request)
        {
            var    key       = Convert.FromBase64String(request.Key); //Encoding.UTF8.GetBytes(request.Key);
            var    iv        = Convert.FromBase64String(request.IV);  //Encoding.UTF8.GetBytes(request.IV);
            string encrypted = string.Empty;
            string decrypt   = string.Empty;

            if (!string.IsNullOrEmpty(request.PlainText))
            {
                encrypted = MixService.EncryptStringToBytes_Aes(request.PlainText, key, iv).ToString();
            }
            if (!string.IsNullOrEmpty(request.Encrypted))
            {
                decrypt = MixService.DecryptStringFromBytes_Aes(request.Encrypted, key, iv);
            }
            JObject data = new JObject(
                new JProperty("key", request.Key),
                new JProperty("encrypted", encrypted),
                new JProperty("plainText", decrypt));

            return(data);
        }