Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

My app uses a .txt file to retreive a list of usernames and passwords, can I jar it?

 
Eric Larsen
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I will post the code for the classes if anyone needs to see it. Thanks in advance for the help.
 
Maneesh Godbole
Saloon Keeper
Posts: 11308
16
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes you can.
However, when you open a stream to the file to read the contents, you should be doing it using the getClass().getResource() method.
 
K. Tsang
Bartender
Posts: 3583
16
Android Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But then new users can't be added and existing users can't be removed.
 
Campbell Ritchie
Sheriff
Posts: 51332
86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And anybody who has a copy of the .jar can unzip it and read all the passwords.
 
salvin francis
Bartender
Posts: 1335
11
Eclipse IDE Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
an out of the topic answer:

1. Do not store username and passwords in text file.
2. Store them in database.
3. If possible, hash the passwords before storing in database.
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic