Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JCE: RC4

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 214
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic