Solved

MD5 Encryption in VB.Net Windows App

Posted on 2006-10-24
4
321 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
  • 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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

707 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now