-1

this is my XML file

<atm>

i want to know how can i verify the account no(acno) and password(and password) that i enter in client.java matches with the acno and password in the atm.xml...

Karthik Raj
  • 181
  • 1
  • 1
  • 7
  • 6
    Just a general comment. Please do not store passwords in plain text. Most users have a limited set of passwords so you become responsible for not only your application's security, but all apps that the users login to. Store it as a hash, and convert the password entered by the user to an hash using the same method and compare them instead. Plain text has no advantage in this context except to save a few lines of (simple) code. Example of this is http://stackoverflow.com/questions/415953/generate-md5-hash-in-java – Optimist Apr 01 '12 at 14:20
  • ATM question, worth helping :) – andbi Apr 01 '12 at 14:27

1 Answers1

0

your int acno and int password is storing value of client supplied data.And document doc is having the values from xml.Just call a method say verify(acno,password,doc[acno,password]) and traverse it through doc[acno,password] to find a match.

Monojit
  • 195
  • 2
  • 3
  • 14