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

AW: [iaik-jce] SMIME



Hello,

when calling encryptedContent.getContent() instead of
encryptedContent.getDataHandler() you should get a Multipart object to be
parsed for the body parts included (see demo.smime.SMimeShow for a sample on
how to parse a MimeMessage). Method writeTo is called on the sender´s side
for giving an RFC 822 formatted ASCII output to be send via SMTP.

Regards,
Dieter Bratko

-----Ursprüngliche Nachricht-----
Von: iaik-jce-owner@iaik.tu-graz.ac.at
[mailto:iaik-jce-owner@iaik.tu-graz.ac.at]Im Auftrag von VRSankar
Gesendet: Donnerstag, 22. März 2001 10:33
An: iaik-jce@iaik.tu-graz.ac.at
Betreff: [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




smime.p7s