?
Solved

Encrypting password field in a table

Posted on 2011-02-17
12
Medium Priority
?
674 Views
Last Modified: 2012-06-22
Hello Experts,

I've created a login form which stores the login information in a table. I would like to encrypt the passwords. I'm very confused, after doing some web research, it seems like everybody has a different idea, but I coudn't find any complete solution which I could follow.

Any help will be appreciated very much.
0
Comment
Question by:hello_everybody
[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
  • 4
  • 2
  • 2
  • +2
12 Comments
 
LVL 120

Assisted Solution

by:Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1) earned 80 total points
ID: 34915685
see this link,
http://support.microsoft.com/?kbid=209871

it has a function "Function KeyCode" that encrypts/decrypts a password
0
 
LVL 8

Author Comment

by:hello_everybody
ID: 34915731
Thanks for the quick response. The article you've pointed me to deals with password protecting a form or report. How would I implement that in a password field in a table?
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 34915745
didn't you read the part

"it has a function "Function KeyCode" that encrypts/decrypts a password"
0
Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

 
LVL 85

Assisted Solution

by:Scott McDaniel (Microsoft Access MVP - EE MVE )
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 120 total points
ID: 34915748
To provide a little more detail:

Access cannot do this natively, so you must take measures similar to the link capricorn posted to do this. You'll have to do this manually - that is, you'll have to work with an unbound Textbox for the Password control, and then Encrypt/Decrypt the password value via code. You can have a bound, hidden field on the form that is used to store and retrieve the password, of course, and that's probably the best way to manage this.

You'd then use the AfterUpdate event of your password Textbox to move data in and out of that field, calling the Encrypt/Decrypt functions as needed. Basically, in the AFterUpdate event of your control, you'd first validate the Password (i.e. you'd "decrypt" the stored value, and compare it to what the user typed in), and then take action as needed (i.e. let the user continue, or alert them that something is wrong with the entered password).
0
 
LVL 51

Assisted Solution

by:Gustav Brock
Gustav Brock earned 200 total points
ID: 34918126
What you should do is to create a MD5 hash of the password and store that.
By doing so, you don't even store the password and there is no way to retrieve it, only reset it.

To check a password, create the MD5 hash of and compare with the stored hash; if match, the password is correct.

Proceed with code here:
http://stackoverflow.com/questions/125785/password-hash-function-for-excel-vba

/gustav
0
 
LVL 21
ID: 34919672
@gustav,

I was recently told that in a EE newsletter it stated that we are not supposed to provide external links except to MSDN articles.  Have you heard this?  
0
 
LVL 21

Accepted Solution

by:
Boyd (HiTechCoach) Trimmell, Microsoft Access MVP earned 1600 total points
ID: 34919771
If you would like to see a working Access example, here is what I use to encrypt passwords : Encryption:

0
 
LVL 51

Expert Comment

by:Gustav Brock
ID: 34920629
> Have you heard this?  

No. Can't be true. This is not a sandbox, there is a world out there.

/gustav
0
 
LVL 21
ID: 34923446
SouthMod,

Thank you for the information . Great advice.  I will gladly  follow it.

I want to be sure that I am following the rules while  doing my best to answer  questions.with the best advice I know.

I had another expert get upset with me for posting an external link.  I was baffled by the response.

Thank you for clearing this up.
0
 
LVL 8

Author Comment

by:hello_everybody
ID: 34935985
Thank you all for your input.
I have an urgent project that came up so this is on hold for the time being, hopefully I'll get back to it sometime this week.
0
 
LVL 21
ID: 34936004
Thanks for the update.
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses

765 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