الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

شتشفير كلمة المرور (مشكلة)

مغلق
بدأه Web-Dv في 23 أغسطس 2006 · 2 رد · 528 مشاهدة · في ASP.NET
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

السلام عليكم

لدي نظام عضوية يعتمد على asp.net 2.0

في ملف الكونفيج أضع :

		<authentication mode="Forms">
			<forms name=".ASPXUSERDEMO" loginUrl="Users/Login.aspx" protection="All" timeout="60">
				<credentials passwordFormat="MD5" /> 

			</forms>
		</authentication>

وعند تسجيل عضو جديد أشفر كلمة السر المدخلة هكذا

System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(Me.txtPwd.Text.Trim, "MD5").ToString

ولكن عند محاولة الدخول أضع كلمة المرور فيقول لي كلمة المرور خطأ! فقمت بتجربة وضع كلمة المرور المشفرة فوراً في التكست بوكس قام دخل ! يعني لا يعتبر عند الدخول أن الكلمة المخزنة هي مشفرة بل يعتبرها عادية مع أنني أشرت في الكونفيج أنها مشفرة؟

ما الحل؟؟؟؟؟؟؟؟

#2

السلام عليكم ورحمة الله و بركاته

اتاكد من انك غيرت password formate في Membership provider اللي في Web.config

Encrypting and Hashing User Passwords

Both of the default Membership providers included in the ASP.NET Framework enable you to store user passwords in three ways:

Clear Passwords are stored in clear text.

Encrypted Passwords are encrypted before they are stored.

Hashed Passwords are not stored. Only the hash values of passwords are stored. (This is the default value.)

You configure how passwords are stored by setting the passwordFormat attribute in the web configuration file. For example, the web configuration file configures the SqlMembershipProvider to store passwords in Hashed .

<?xml version="1.0"?>
<configuration>
	<system.web>
	  <authentication mode="Forms" />

	  <membership defaultProvider="MyProvider">
		<providers>
		  <add
			name="MyProvider"
			type="System.Web.Security.SqlMembershipProvider"
			passwordFormat="Hashed"
			connectionStringName="LocalSqlServer"/>
		</providers>

	  </membership>
	</system.web>
</configuration>

The default value of the passwordFormat attribute is Hashed. By default, actual passwords are not stored anywhere. A hash value is generated for a password and the hash value is stored.

Note

A hash algorithm generates a unique value for each input. The distinctive thing about a hash algorithm is that it works in only one direction. You can easily generate a hash value from any value. However, you cannot easily determine the original value from a hash value.

ر بنايوفقك

#3

السلام عليكم

شكراً لك أخي الكريم

لكنني لا أستخدم أي فروفايدر !

فإنني أعمل على نظام الأمان القديم ولا أستخدم النظام الجديد فهل من حل ؟

ألف شكر

هذا الموضوع مغلق.

مواضيع مشابهة