Results 1 to 2 of 2
  1. #1
    firewalll is offline Member
    Join Date
    Sep 2009
    Posts
    7
    Rep Power
    0

    Default Masking password for logging

    Dear all,

    I have a question on masking password for logging

    When putting this message (in string format) to log,
    <ConfigDetails><ConfigGroup name="configgp1"><LastUpdateTimestamp>Tue Sep 29 11:57:17 HKT 2009</LastUpdateTimestamp><Config key="USERNAME" value="testing"/><Config key="PASSWORD" value="abcd1234"/></ConfigGroup></ConfigDetails>

    it is required to change to:
    <ConfigDetails><ConfigGroup name="configgp1"><LastUpdateTimestamp>Tue Sep 29 11:57:17 HKT 2009</LastUpdateTimestamp><Config key="USERNAME" value="testing"/><Config key="PASSWORD" value="********"/></ConfigGroup></ConfigDetails>

    How can I extract the config key "PASSWORD" and change its value to all *?

    Thanks:):):):):):)

  2. #2
    mrmatt1111's Avatar
    mrmatt1111 is offline Senior Member
    Join Date
    Aug 2009
    Location
    San Jose, CA, USA
    Posts
    320
    Rep Power
    12

    Default

    Review the String class API... like String.subString(...) and String.indexOf(...)
    My Hobby Project: LegacyClone

Similar Threads

  1. how to check password for 3 times enterd wrong password
    By sk.mahaboobbhasha@gmail.c in forum New To Java
    Replies: 2
    Last Post: 11-14-2008, 08:53 PM
  2. how to check password for 3 times enterd wrong password
    By sk.mahaboobbhasha@gmail.c in forum Java Servlet
    Replies: 0
    Last Post: 11-14-2008, 02:22 PM
  3. How to check password of a jsp/html with the password of Database(mysql) #1
    By sk.mahaboobbhasha@gmail.c in forum Java Servlet
    Replies: 2
    Last Post: 11-14-2008, 02:11 PM
  4. what is logging
    By Thirumalt in forum Java Software
    Replies: 1
    Last Post: 11-26-2007, 12:37 PM
  5. Logging
    By ravian in forum New To Java
    Replies: 3
    Last Post: 11-18-2007, 11:22 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •