Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VB.NET
Confused | :confused:
 
Is there a way I can protect a windows form with a password that is NOT HARD CODED! and does not depend to much on a file??? what I mean is that if somone deleted the file the program would still work. I kinda need some code here.
Posted 17-Apr-10 15:03pm
Edited 18-Apr-10 3:06am
v2
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 4

Just store a hash of the password in some string in the program, re-hash the password that the user gives you, and compare it to the stored hash.
Note that a determined hacker will probably break this in seconds (by jumping over your validation code).
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Code Master123 wrote:
depend to much on a file

 
Guess that would depend what is too much. First, passwords should never, ever, be hard-coded in your application. There are a number of ways to do this. Use Windows authentication, use a database, hash the password initially and compare one that is given.
  Permalink  
Comments
Code Master123 at 19-Jun-10 1:07am
   
Reason for my vote of 1
not a good idea
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

You could store it in some obscure place in the registry.
  Permalink  
Comments
Code Master123 at 19-Jun-10 1:07am
   
Reason for my vote of 1
a
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

That will not work because my program is supposed to be portable on your flash drive. HELP!
  Permalink  
v2
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 5

You can use your hardware models too as a password and for matching it you can use WMI. Anyhow Hashing and Windows Authentication are good options.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Maciej Los 450
1 OriginalGriff 403
2 Sergey Alexandrovich Kryukov 219
3 Peter Leow 190
4 CPallini 189
0 OriginalGriff 6,092
1 Sergey Alexandrovich Kryukov 5,022
2 Maciej Los 3,269
3 Peter Leow 3,164
4 DamithSL 2,490


Advertise | Privacy | Mobile
Web02 | 2.8.140721.1 | Last Updated 18 Apr 2010
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100