From: Kapadi, A. <AK...@ti...> - 2006-05-11 16:15:28
|
Hi, =20 I was able to solve the problem I had below. Now I am able to encrypt the= Text or ASCII file using Cryptix but when the file size is big (>10Mb), it= takes a long time to do the encryption. The following is code snippet I am= using.=20 =20 java.io.BufferedReader in =3D new java.io.BufferedReader(new java.io.FileR= eader(new java.io.File(textFile))); String line =3D null; while ((line=3Din.readLine()) !=3D null) { msg =3D msg.concat(line); msg =3D msg.concat("\n"); } in.close(); LiteralMessageBuilder lmb =3D LiteralMessageBuilder.getInstance= ("OpenPGP"); lmb.init(msg.getBytes()); litmsg =3D (LiteralMessage) lmb.build();=20 =20 I used to pass the string object to INIT method of LiteralMessageBuilder bu= t changed to bytes assuming it would be faster. It is faster compared to wh= en I used to pass the string but still it takes around 2hrs+ to encrypt any= file bigger than 10Mb. Did any one encounter this problem? Any suggestions= to improve the speed?=20 Thanks,=20 ----------------------=20 Avinash=20 -----Original Message----- From: cry...@li... [mailto:cryptix-users-admin= @lists.sourceforge.net]On Behalf Of Kapadi, Avinash Sent: Wednesday, May 10, 2006 11:37 AM To: Subject: [Cryptix-users] Problem with Cryptix JCE Provider Hi,=20 I am having problem while encrypting a text file using Cryptix. I am usin= g RSA legacy (2048 bit) key for encryption. When I run my program to do the= encryption, I get an error saying=20 "Exception in thread "main" java.lang.SecurityException: invalid SHA1 signa= ture File digest for cryptix/jce/provider/rsa/RSAPublicKeyCryptix.class" I have downloaded all the related jar files and also unlimited strength po= licy file from Sun. I am not able to figure out what else could be going wr= ong. Any help would be greatly appreciated. Thanks,=20 ----------------------=20 Avinash=20 ************************************************************** This message, including any attachments, contains confidential information = intended for a specific individual and purpose, and is protected by law. If= you are not the intended recipient, please contact sender immediately by r= eply e-mail and destroy all copies. You are hereby notified that any disclo= sure, copying, or distribution of this message, or the taking of any action= based on it, is strictly prohibited. TIAA-CREF ************************************************************** ************************************************************** This message, including any attachments, contains confidential information = intended for a specific individual and purpose, and is protected by law. I= f you are not the intended recipient, please contact sender immediately by = reply e-mail and destroy all copies. You are hereby notified that any disc= losure, copying, or distribution of this message, or the taking of any acti= on based on it, is strictly prohibited. TIAA-CREF ************************************************************** |