[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[iaik-jce] SMIME



Hello,
I am trying to get message and attachments from EncryptedContent object.
There is message and attachment in DataHandler object which I got from
getDataHandler() method after decrypting. When I use writeTo() method in
dataHandler I am getting text and attachment mixed. How to separate
them.
Help me.
Thank you and regards
Ravi

---404390683.985252370260.JavaMail.VRSankar@stl3
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

This is a Test of the IAIK S/MIME implementation!


---404390683.985252370260.JavaMail.VRSankar@stl3
Content-Type: application/octet-stream; name=test.java
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename=test.java

import java.util.*;

public class Test {
public static void main(String[] args) {
String st = "ab\tcd\r\nefgh\r\nij\r\nklmn op";
StringTokenizer str = new StringTokenizer(st,"\r\n\t");
String s = "";
while(str.hasMoreTokens())
	s =s+str.nextToken();
System.out.println("FinalString:"+s);
}
}
---404390683.985252370260.JavaMail.VRSankar@stl3--
--
Mailinglist-archive at http://jcewww.iaik.at/mailarchive/iaik-jce/jcethreads.html

To unsubscribe send an email to listserv@iaik.at with the folowing content: UNSUBSCRIBE iaik-jce