Hi,

    Sorry to place this question here, JCE does not jave any mailing list, and i am 
having trouble making JCE 1.2.1 work. Can any body help me? thanks.

    i have place all the jar files into the jre/lib/ext directory
    edited the /jre/lib/secutirty/java.security and added the line 
security.provider.2=com.sun.crypto.provider.SunJCE

    Tried to complie this code:

import javax.crypto.*;

class  test
  {
    public static void main(String[] args)
     {
        try
          {
             KeyGenerator keygen = KeyGenerator.getInstance("DES");
             SecretKey desKey = keygen.generateKey();
             Cipher desCipher;

             desCipher = Cipher.getInstance("DES/ECB/PKCS5Padding");
             desCipher.init(Cipher.ENCRYPT_MODE, desKey);

             byte[] cleartext = args[0].getBytes();
             byte[] ciphertext = desCipher.doFinal(cleartext);

             System.out.println("Clear Text:"+cleartext);
             System.out.println("Cipher Text:"+ciphertext);

             desCipher.init(Cipher.DECRYPT_MODE, desKey);

             byte[] cleartext1 = desCipher.doFinal(ciphertext);
             System.out.println("DeCipher Text:"+cleartext1);
        }
     catch(Exception e)
        {
           System.out.println(e);
       }
   }
}


        Compilation no problem, when running "java test hello" the following error 
occured:
java.lang.SecurityException: Cannot authenticate JCE framework 
java.lang.SecurityException: The JCE framework has unsigned class files.

        Where did i go wrong? Please help me.... It's urgent for me to finish this 
ASAP.

Jack

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to