Results 1 to 4 of 4
  1. #1
    yasarqamar is offline Member
    Join Date
    Jul 2012
    Posts
    14
    Rep Power
    0

    Default XML Form Encryption using Java (the best approach?)

    My query is simple in that I want to encrypt an XML Form using Java. As far, I implemented a very elementary method using the File I/O stream of Java. It basically reads the XML form and reads it line by line. I then used string tokenizer class to put some checks for the tags (tags are not to be encrypted), and then read the values of the elements one character at a time. I shifted the ascii values of this text and then using the Write method created a new file (encrypted) and write the XML Form in it.

    Since I'm a beginner in Java, and hence don't have sufficient know how of its libraries and the likes, I want to know is there another better way to perform the above task? I'll be really grateful for your responses.

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,085
    Rep Power
    20

    Default Re: XML Form Encryption using Java (the best approach?)

    What are you planning on doing about escaped characters?
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  3. #3
    yasarqamar is offline Member
    Join Date
    Jul 2012
    Posts
    14
    Rep Power
    0

    Default Re: XML Form Encryption using Java (the best approach?)

    Escaped characters are not allowed as input into the form. The element values in the form will contain simple digits and alphabets. Other characters are considered as invalid input into the form and won't be submitted.

  4. #4
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,085
    Rep Power
    20

    Default Re: XML Form Encryption using Java (the best approach?)

    OK.
    Have you looked into a SAX parser?
    That might save you some time messing around with the tag tracking.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

Similar Threads

  1. Confused About How To Approach Java
    By AmpedNavy in forum Java Gaming
    Replies: 5
    Last Post: 07-03-2012, 11:18 PM
  2. Replies: 3
    Last Post: 04-17-2012, 06:15 PM
  3. New to Java looking for a strategic approach..for a prototype
    By andydowthwaite in forum New To Java
    Replies: 1
    Last Post: 03-14-2012, 09:43 AM
  4. Replies: 1
    Last Post: 07-28-2011, 07:43 AM
  5. TEAV Encryption From JSP Web Form
    By vernacular26 in forum JavaServer Pages (JSP) and JSTL
    Replies: 0
    Last Post: 07-10-2011, 08:17 AM

Posting Permissions

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