aspose file tools*
The moose likes Other JSE/JEE APIs and the fly likes JCE: RC4 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "JCE: RC4" Watch "JCE: RC4" New topic
Author

JCE: RC4

Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Helo!
When I try to run RC4 test I get following exception:
Generating a RC4 key...
Exception in thread "main" java.security.NoSuchAlgorithmException: Algorithm RC4
not available
at javax.crypto.SunJCE_b.a(DashoA6275)
at javax.crypto.KeyGenerator.getInstance(DashoA6275)
at FileEncryptorRC4.createKey(FileEncryptorRC4.java:43)
at FileEncryptorRC4.main(FileEncryptorRC4.java:28)
Any ideas for this? I am using Sun-1.4 JRE which has JCE integrated.
Thanks in advance
Lewin Chan
Ranch Hand

Joined: Oct 10, 2001
Posts: 214
Hi, there
the SunJCE provider doesn't generally come with very many algorithms. You wil need to find a crypto-provider that has the RC4 algorithm, and that you can install as a Security provider using

or by putting it into the java.security? file.
You can try for a demo version of IAIK at http://www.iaik.at or maybe try the free version of cryptix http://www.cryptix.org
brgds
Lewin


I have no java certifications. This makes me a bad programmer. Ignore my post.
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Originally posted by Lewin Chan:
Hi, there
the SunJCE provider doesn't generally come with very many algorithms. You wil need to find a crypto-provider that has the RC4 algorithm, and that you can install as a Security provider using

or by putting it into the java.security? file.
You can try for a demo version of IAIK at http://www.iaik.at or maybe try the free version of cryptix http://www.cryptix.org
brgds
Lewin

Thx, Lewin
Now I am a bit embarressed as I found the "Professional Java Security" on my bookself which I won from this forum =)
The book describes the JCE installation in full detail, especially for Bouncy Castle JCE.
Bouncy Castle JCE seems to be working fine.
But, anyways, thx
 
Don't get me started about those stupid light bulbs.
 
subject: JCE: RC4