public boolean checkPassword(String password){
  try {
    RandomAccessFile raf=new RandomAccessFile(sLockPasswordFilename,"r");
    final byte[] stored=new byte[(int)raf.length()];
    int got=raf.read(stored,0,stored.length);
    raf.close();
    if (got <= 0) {
      return true;
    }
    return Arrays.equals(stored,passwordToHash(password));
  }
 catch (  FileNotFoundException fnfe) {
    return true;
  }
catch (  IOException ioe) {
    return true;
  }
}

public boolean checkPassword ( String password ) { try { RandomAccessFile raf = new RandomAccessFile ( sLockPasswordFilename , "r" ) ; final byte [ ] stored = new byte [ ( int ) raf . length ( ) ] ; int got = raf . read ( stored , 0 , stored . length ) ; raf . close ( ) ; if ( got <= 0 ) { return true ; } return Arrays . equals ( stored , passwordToHash ( password ) ) ; } catch ( FileNotFoundException fnfe ) { return true ; } catch ( IOException ioe ) { return true ; } }
check to see if a password matches the saved password . if no password exists , always returns true .
