zoukankan      html  css  js  c++  java
  • JS加密对应的c#解码

     

    escape不编码字符有69个:*,+,-,.,/,@,_,0-9,a-z,A-Z

    encodeURI不编码字符有82个:!,#,$,&,',(,),*,+,,,-,.,/,:,;,=,?,@,_,~,0-9,a-z,A-Z

    encodeURIComponent不编码字符有71个:!, ',(,),*,-,.,_,~,0-9,a-z,A-Z

    1.

    JS: escape : 解码使用:unescape

    C#:HttpUtility.UrlEncode 解码使用: HttpUtility.UrlDecode

    2.

    JS: encodeURI :解码使用decodeURI();

    C#: decodeURIComponent

    3.

    JS: encodeURIComponent  解码使用:decodeURIComponent()

    C#:[HttpContext.Current.]Server.UrlDecode 解码使用: [HttpContext.Current.]Server.UrlEncode 

    其实Escape,encodeURI,encodeURIComponent .其实都可以用HttpUtility.UrlDecode或者Server.UrlDecode 解码效果是一样的。

    唯一区别看就是 HttpUtility.UrlDecode默认是utf8编码,Server.UrlDecode是根据webconfig配置的默认编码去解密的。

  • 相关阅读:
    bzoj 4361: isn
    bzoj 2560: 串珠子
    bzoj 3622: 已经没有什么好害怕的了
    UOJ #30. 【CF Round #278】Tourists
    Codeforces Round #452 E. New Year and Old Subsequence
    bzoj 2653: middle
    codeforces701C
    codeforces437C
    codeforces518B
    codeforces706C
  • 原文地址:https://www.cnblogs.com/Wilson6/p/9485968.html
Copyright © 2011-2022 走看看