The .NET framework has a some useful hidden methods available.
One of them is a static method of the FormAuthentication class,
from the System.Web.Security namespace, HashPasswordForStoringInConfigFile().
---------------------------------------------------------------------------
using System;
using System.Web;
using System.Web.Security;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
string password =
FormsAuthentication.HashPasswordForStoringInConfigFile("password", "SHA1");
Response.Write(password);
}
}
---------------------------------------------
This code writes “5BAA61E4C9B93F3F0682250B6CF8331B7EE68FD8″ to the page.
--------------------------------
Also You can Visit ... [www.ratajik.com/CreateNetPassword/Default.aspx ]
Thursday, December 22, 2011
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment