Use the JCE (Java Cryptographic Extension), available from Sun (<http://java.sun.com/products/jce/>). Remember that after encryption, you will get binary output, so don't forget to base64 encode, otherwise X.25 mailing systems may corrupt the mailed data. I think there are some export restrictions on this though. Or use an S/MIME provider to work with JavaMail. This would include support for email signing and encryption. The Phaos S/MIME toolkit <http://www.phaos.com/e_security/prod_smime.html> and JCSI <http://security.dstc.edu.au/projects/java/release2.html> are two implementations you can look into.
Another alternative at http://www.javaworld.com/javaworld/javatips/jw-javatip115.html?remote_addr=2 07.239.31.62&user_agent=Mozilla/4.0%20(compatible%3b%20MSIE%205.5%3b%20Windo ws%20NT%204.0) > -----Original Message----- > From: Lorena Carlo [SMTP:[EMAIL PROTECTED]] > Sent: Thursday, February 07, 2002 05:07 PM > To: [EMAIL PROTECTED] > Subject: Its very urgent: How can I encrypt a mail using > JavaMail!!!!!! > > Hello, > > How can I encrypt a mail using JavaMail, help me please > > thanks in advance > > Lorena Carlo > > ========================================================================== > = > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff > JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST > DIGEST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://archives.java.sun.com/jsp-interest.html > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.jsp > http://www.jguru.com/faq/index.jsp > http://www.jspinsider.com =========================================================================== To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com