Does anyone install JCE 1.2.2 in J2ME

Z

Zheng Da

Can JCE 1.2.2 be installed in J2ME?
The J2ME I use is CrEme.
I want to encrypt and decrypt data, so I tried to install JCE 1.2.2 in
it.
I set the class path to include the directory containing the JCE 1.2.2
framework and "SunJCE" provider JAR files.
The policy file I use is:
grant{
permission java.security.AllPermission;
};
That is, all permission is granted.
Then, I register the SunJCE provider by adding the following lines at
the beginning of my program:
Security.addProvider(new com.sun.crypto.provider.SunJCE());

However, I still get the
java.lang.ExceptionInInitializerError.
java.lang.SecurityException:Cannot set up certs for trusted
CAs:java.security.privilegedActionException

So what should I do to install the JCE?
Thank you.
 
Z

Zheng Da

<Using JCE in a J2ME environment> in the developerWorks of IBM
describes how to implement JCE in J2ME, though I don't quite understand
the article.
Then if JCE cannot be installed in J2ME, is there other packages for
J2ME to encrypt and decrypt the data?
 
D

Darryl L. Pierce

Zheng said:
Then if JCE cannot be installed in J2ME, is there other packages for
J2ME to encrypt and decrypt the data?

Take a look at the Bouncy Castle libraries. That's what I use.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,434
Messages
2,571,689
Members
48,796
Latest member
Greg L.

Latest Threads

Top