Solved

MD5 Encryption in VB.Net Windows App

Posted on 2006-10-24
4
329 Views
Last Modified: 2006-11-18
We want to use the same user authentication from a new Windows application as is used in a VB.Net 2003 Intranet app.  Both access the same SQL database.

The web authentication uses:

        Dim MyAuthentication As New System.Web.Security.FormsAuthentication
        Dim pwd As String = MyAuthentication.HashPasswordForStoringInConfigFile(txtPassword.Text, "md5")
 
Is there a corresponding way to do this in a classic windows app so the encrypted password will be the same?

Thanks
0
Comment
Question by:John4343
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 9

Expert Comment

by:jonorossi
ID: 17795966
If you add a reference to System.Web into your Windows Forms application and use code like this:

System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile("password", "md5")
0
 

Author Comment

by:John4343
ID: 17796116
I had tried that earlier but get "security is not a member of web" error.
0
 
LVL 9

Accepted Solution

by:
jonorossi earned 250 total points
ID: 17796196
Was this at compile time? If you didn't add a reference to System.Web in your project then you would only have access to a few System.Web classes (AspNetHostingPermission ones).
0
 

Author Comment

by:John4343
ID: 17796248
Thanks.  I did the imports but not the reference.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question