SHA1 , 128 . , PHP-, :). .
(
https://msdn.microsoft.com/en-us/library/t8yy6w3h.aspx
):
<configuration>
<connectionStrings>
<add name="SqlServices" connectionString="Data Source=MySqlServer;Integrated Security=SSPI;Initial Catalog=aspnetdb;" />
</connectionStrings>
<system.web>
<authentication mode="Forms">
<forms loginUrl="login.aspx" />
</authentication>
<authorization>
<deny users="?" />
</authorization>
<membership defaultProvider="SqlProvider" userIsOnlineTimeWindow="20">
<providers>
<add name="SqlProvider"
type="System.Web.Security.SqlMembershipProvider"
connectionStringName="SqlServices"
enablePasswordRetrieval="false"
enablePasswordReset="true"
requiresQuestionAndAnswer="false"
passwordFormat="Hashed"
applicationName="/" />
</providers>
</membership>
</configuration>
</system.web>
U .
hash alg. SHA1, HMACSHA256 SHA256 .NET 4.0 Framework. U :
<membership
defaultProvider="provider name"
userIsOnlineTimeWindow="number of minutes"
hashAlgorithmType="SHA1">
<providers>...</providers>
</membership>
SHA, .NET, .NET 4 SHA512, .
, ( .dll, machine.config , , web.config, ):
https://msdn.microsoft.com/en-us/library/693aff9y.aspx
Membership.Validate .
If you use the new MVC thing that came out in 2013, UserManager u just implements a user who has an email, all of which should be IUser. There is a UserManager.CreateUser method (TUser user, string password)
source
share