?
Solved

MD5 Encryption in VB.Net Windows App

Posted on 2006-10-24
4
Medium Priority
?
330 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 1000 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

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

764 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