CodeVerge.Net Beta


   Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums




Can Reply:  No Members Can Edit: No Online: Yes
Zone: > Asp.Net Forum > starter_kits_and_source_projects.commerce_starter_kit Tags:
Item Type: Date Entered: 4/26/2004 2:45:27 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
NR
XPoints: N/A Replies: 4 Views: 80 Favorited: 0 Favorite
5 Items, 1 Pages 1 |< << Go >> >|
"rmvenancio" <>
NewsGroup User
Crypt Password4/26/2004 2:45:27 PM

0


Anyone have made any module to encrypt/decrypt customers passwords in the database ?

If no one have made this, can anyone recomend a good article how to use C# to ecrypt passawords in the database ?

Thank you for your help.
"LiquidEnforcer
NewsGroup User
Re: Crypt Password5/18/2004 11:08:38 PM

0

Check out using MD5. Its one way encryption but all you have to do to check a users password is compare the hash of the entered password to the hash in the database.
"jemery27" <>
NewsGroup User
Re: Crypt Password7/10/2004 9:07:36 PM

0

Here is an article I used to get this working:

http://aspnet.4guysfromrolla.com/articles/103002-1.aspx

I added a function in the customersDB class called hashPassword, then just called it from everywhere I normally used the string password. I also changed the datatypes in the database, stored procedures and class functions to use binary(16) or byte() as appropriate. FYI - you have to use byte(), not byte as the type. (it is an array of bytes, not just a byte type)

Jason
"jemery27" <>
NewsGroup User
Re: Crypt Password7/11/2004 6:58:26 PM

0

I found an even better way to do this:

http://support.microsoft.com/default.aspx?scid=kb;EN-US;308157

You will also notice you do not need to write your own hash function. Instead you can leave all the stored procs, tables, and class functions as strings and use this:

"You may want to store passwords securely in a database. You can use the FormsAuthentication class utility function named HashPasswordForStoringInConfigFile to encrypt the passwords before you store them in the database or configuration file."

It's in the system.web.security class and you just add the imports to any vb files which need to create the hashes.

"webxcraz" <>
NewsGroup User
Re: Crypt Password7/15/2004 3:00:40 PM

0

Here's a simple function that encrypts any string into a MD5 hash string:


Public Function EncryptMD5(ByVal text As String) As String
Dim md5Hasher As New MD5CryptoServiceProvider
Dim encoder As String
encoder = BitConverter.ToString(md5Hasher.ComputeHash(Encoding.ASCII.GetBytes(text))).Replace("-", Nothing)
Return encoder
End Function

this uses the "System.Security.Cryptography" namespace

-Frank
5 Items, 1 Pages 1 |< << Go >> >|


Free Download:













layout question

redirecting based on user role

component art not work

using wizard control in asp.net 2005

mssql server

moving to asp.net, exposing raw data

gridview hyperlinkcolumn

reading a value from a dataview

i am looking for a group box

how do i track down a memory leak?

can vb/c#/j# .net create professional report?

sql and datareader problem

datagrid search

export html table to excel

frame refresh

one web application, multiple projects

private int id; or int id -- when to make them private, or protect

some question on vb.net can some kind soul help me?

user.identity - how long does it last for?

page events doesn't show up in the drop down for c# but shows up for vb code.

downloading a file from a asp.net page?

smaall problem..

display folder size or directory size using asp.net and vb.net

dnn hosting problem - need help

error - split string

meta tags

what container (control) can hold a few controls?

how can we determine the any object in a image ?

server application unavailable

class & method summaries

file upload

getting url

parser error

saving an email copy when sending mail using mailmessage

anyone know how to get mt dropdown to organise alphabetically

good magazine about asp.net

code won't show up?

detailsview problem

writing html table from code behind

finding size of a directory or folder using asp.net and vb.net

acl problems - domain\users account

page cannot be displayed after migration to iis 6

query sql based on login

how to upload a file on web server

avatars?

abcd.trim().tolower()

customer relationship management (crm) support

anybody knows how to combine two pictures in one picture?

url rewriting and non-existing folders

drop down list index changed event

   
  Privacy | Contact Us
All Times Are GMT