public static T ReadCookie <T>(this HttpContext httpContext, string Key)
        {
            string value = httpContext.Request.Cookies[Key];

            value = Encyptor.Decrypt(value, "123");
            return(JsonConvert.DeserializeObject <T>(value));
        }
        public static void WriteCookie(this HttpContext httpContext, string key, object value)
        {
            string        serial  = JsonConvert.SerializeObject(value);
            CookieOptions options = new CookieOptions();

            options.Expires = DateTimeOffset.Now.AddDays(3);

            options.HttpOnly = true;


            string data = Encyptor.Encrypt(serial, "123");

            httpContext.Response.Cookies.Append(key, data, options);
        }