zoukankan      html  css  js  c++  java
  • 生成一个加密的email 地址

     1  private string CmsCloakText(string text)
     2         {
     3             StringBuilder sb = new StringBuilder();
     4             System.Text.ASCIIEncoding asciiEncoding = new ASCIIEncoding();
     5             byte[] bytes = new byte[text.Length];
     6             int count = asciiEncoding.GetBytes(text, 0, text.Length, bytes, 0);
     7             for (int i = 0; i < count; i++)
     8             {
     9                 sb.Append((int)bytes[i]);
    10                 if (i < count - 1)
    11                 {
    12                     sb.Append(",");
    13                 }
    14             }
    15             return sb.ToString();
    16         }
    17         private string GetEmail(string strEmail,string ShowMessage)
    18         {
    19             StringBuilder sb = new StringBuilder();
    20             
    21             sb.Append("<script>");
    22             sb.Append("document.write(\"<class = 'CmsPageBottomFeedback' href='mailto:\" + String.fromCharCode(" + this.CmsCloakText(strEmail) + ")+\"'>\");");
    23 
    24             sb.Append("document.write(String.fromCharCode(" + this.CmsCloakText(ShowMessage) + "));");
    25             sb.Append("document.write('</a>');");
    26             sb.Append("</script>");
    27             return sb.ToString();
    28 
    29             //           <script>
    30             //document.write("<a href='mailto:" + String.fromCharCode(105,105,121,106,114,113,119,64,49,54,51,46,99,111,109) +"'>");
    31             //document.write(String.fromCharCode(105,105,121,106,114,113,119,64,49,54,51,46,99,111,109));
    32             //document.write('</a>');
    33             //</script>
    34 
    35         }
  • 相关阅读:
    HP SAN Switch參考文檔地址
    hp,Qlogic,Brocade光纖卡查看方式
    使用nbrbutil工具來處理requested media id is in use, cannot process request
    NBU expired Media,Media ID not found in EMM database
    訪問索引的方法
    Linux光纖卡配置,磁盤掛載,多路徑設置
    Linux 6.5網卡配置
    Oracle ASM
    NBU bplabel命令擦除磁帶數據
    鼠标悬浮显示完整信息
  • 原文地址:https://www.cnblogs.com/snowball/p/374504.html
Copyright © 2011-2022 走看看