91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 16KB
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發布日期: 2021-06-07
  • 語言: C#
  • 標簽: 加密解密??

資源簡介

登錄頁面代碼實例,利用js對用戶名、密碼進行加密,將密文傳輸到后臺,C#在后臺解密后驗證登錄

資源截圖

代碼片段和文件信息

using?System;
using?System.Data;
using?System.Configuration;
using?System.Collections;
using?System.Web;
using?System.Web.Security;
using?System.Web.UI;
using?System.Web.UI.WebControls;
using?System.Web.UI.WebControls.WebParts;
using?System.Web.UI.HtmlControls;
using?System.Security.Cryptography;
using?System.IO;
using?CodeName.APPa;
public?partial?class?LoginNew?:?System.Web.UI.Page
{

????private?RSACrypto?rsa?=?new?RSACrypto();
????private?RSAParameters?param;
????protected?void?Page_Load(object?sender?System.EventArgs?e)
????{
????????if?(!IsPostBack)
????????{
????????????GetKey.GetKeyFunction();
????????}
????????string?path?=?Session[“key“].ToString()?+?ConfigurationManager.AppSettings[“rsaPrivateKeyFilePath“];
????????rsa.InitCrypto(Server.MapPath(“~/Myxml/“)?+?path);
????????param?=?rsa.ExportParameters(true);
????}
????protected?string?GetRSA_E()
????{
????????return?StringHelper.BytesToHexString(param.Exponent);
????}
????protected?string?GetRSA_M()
????{
????????return?StringHelper.BytesToHexString(param.Modulus);
????}

????protected?void?btnLogin_ServerClick(object?sender?System.EventArgs?e)
????{
????????string?tmp?=?StringHelper.ASCIIBytesToString(rsa.Decrypt(StringHelper.HexStringToBytes(Request.Params[“posx“])));
????????string[]?parts?=?tmp.Split(‘\\‘);
????????string?username?=?StringHelper.ASCIIBytesToString(StringHelper.Frombase64(parts[0]));
????????string?password?=?StringHelper.ASCIIBytesToString(StringHelper.Frombase64(parts[1]));

????}
}

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件???????1227??2008-08-28?17:42??RSAWeb\RSAWeb\App_Code\Migrated\GetKey.cs

?????文件???????1345??2008-08-28?11:35??RSAWeb\RSAWeb\App_Code\Migrated\Login_aspx_cs_ADAuthManager.cs

?????文件???????1781??2008-08-28?14:39??RSAWeb\RSAWeb\App_Code\Migrated\Login_aspx_cs_RSACrypto.cs

?????文件???????2470??2008-08-28?15:43??RSAWeb\RSAWeb\App_Code\Migrated\Login_aspx_cs_StringHelper.cs

?????文件???????1812??2005-08-04?13:42??RSAWeb\RSAWeb\crypto\Barrett.js

?????文件??????15728??2005-08-04?13:42??RSAWeb\RSAWeb\crypto\BigInt.js

?????文件???????4020??2005-08-29?23:44??RSAWeb\RSAWeb\crypto\RSA.js

?????文件???????6420??2008-08-28?18:12??RSAWeb\RSAWeb\LoginNew.aspx

?????文件???????1538??2008-08-28?18:04??RSAWeb\RSAWeb\LoginNew.aspx.cs

?????文件???????1773??2008-08-28?16:12??RSAWeb\RSAWeb\Web.Config

?????文件???????1488??2008-08-28?16:09??RSAWeb\RSAWeb.sln

????..A..H.?????10752??2008-08-28?18:01??RSAWeb\RSAWeb.suo

?????目錄??????????0??2008-08-28?17:42??RSAWeb\RSAWeb\App_Code\Migrated

?????目錄??????????0??2008-08-28?16:37??RSAWeb\RSAWeb\App_Code

?????目錄??????????0??2008-08-28?16:05??RSAWeb\RSAWeb\App_Data

?????目錄??????????0??2008-08-28?16:07??RSAWeb\RSAWeb\crypto

?????目錄??????????0??2008-08-28?18:14??RSAWeb\RSAWeb\Myxml

?????目錄??????????0??2008-08-28?18:12??RSAWeb\RSAWeb

?????目錄??????????0??2008-08-28?16:05??RSAWeb

-----------?---------??----------?-----??----

????????????????50354????????????????????19


評論

共有 條評論