zoukankan      html  css  js  c++  java
  • 计算ScriptResource.axd的d参数

    protected void Page_Load(object sender, EventArgs e)

    { var url= string.Format("ScriptResource.axd?d={0}", PageEncryptString("Q|~/web.config|#|xlsb"));

    //var info = F.Studio.Web.Utility.MachineKeyUtil.GenerateMachineKey();

     //Response.Write("D->" + info.Decryption +":" + info.DecryptionKey +"
    "); //Response.Write("V->" + info.Validation +":" + info.ValidationKey);

    }

    public static string PageDecryptString(string input) {

    Type type = typeof(System.Web.UI.Page);

     object o = Activator.CreateInstance(type);

    System.Reflection.MethodInfo mi = type.GetMethod("DecryptString", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Static, null, new Type[] { typeof(string) }, null);

    object result = mi.Invoke(o, new object[] { input }); return result.ToString();

    }

     public static string PageEncryptString(string input)

     {

    Type type = typeof(System.Web.UI.Page);

    object o = Activator.CreateInstance(type); System.Reflection.MethodInfo mi = type.GetMethod("EncryptString", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Static, null, new Type[] { typeof(string) }, null); object result = mi.Invoke(o, new object[] { input }); return result.ToString();

     }

  • 相关阅读:
    docker容器安装使用
    hashMap学习
    spark运行方式及其常用参数
    java面试题基础
    大数据面试题
    java面试题
    Java四种线程池
    大数据
    pyspark 日期格式
    CMake error:System Error:No such file or directory CMake error:Could not open file for write in copy operation xxxx.ros_Config.cmake.tmp.
  • 原文地址:https://www.cnblogs.com/wdfrog/p/1834631.html
Copyright © 2011-2022 走看看