• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Storing Passwords in MySQL

 
Ranch Hand
Posts: 226
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi friends,

I am new to all this Database stuff...

I am learning them , only because i wanna incorporate some persistent story to my web app...

Can some one tell how i could store the passwords in a way it is unreadable to naked eye..


either,
1)through DBMS--MySQL
2)or programmatically
 
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Theepan Thevathasan:

either,
1)through DBMS--MySQL
2)or programmatically[/QB]



Either approach is fine. 2) is probably a better solution regarding to portability.
 
Deepan Devadasan
Ranch Hand
Posts: 226
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi..
sorry i was my mistake, that i didnt ask why ...

can some give some code /procedures for the two options...

thanks in advance
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This seems to be a way to do number 1 (Caveat - I don't know MySQL that well, so there is in all probablility a different/better way to do this).

My preference would be to do this programatically round some sort of hashing standard (such as MD5). This way your application is database indenendent, and it allows other applications that can implement a digest using this standard a route to validate passwords based on the database values. Have a look at the classes available to you in the java.security package.
 
Those are the largest trousers in the world! Especially when next to this ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic