Two important things about client creation:
Problem:
|
Code:
|
java.security.NoSuchAlgorithmException: PBEWithSHAAndTwofish-CBC SecretKeyFactory not available |
BOUNCY CASTLE:
...can be solved using second approach - using external library.
So go to Bouncy Castle site and download this jar
http://downloads.bouncycastle.org/ja...-jdk16-145.jar
It is not enough just to place it in classpath
there are come security provider issues that has to be added to src code like:
|
Code:
|
Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider()); |
...and more about how to configure security this BC's API is explained here:
JDK/JCE environment Configuration
I guess there is a way to completely avoid usage of BC API
but you posted SignatureAuthenticationClient class that use it...
Now before you make your client work,
be sure you can deal with that algorithm exception,
and easiest way to do this is by configuring and running
another class of your tutorial
PBE.java
Be sure you add BC API *.jars,
|
Code:
|
'Security.addProvider(...)' |
code
and this can be args[] to start example:
|
Code:
|
-e a dobardanzxzxzxzxzxzx |
OTHER SOLUTION:
Probably many other problems will arise so ask yourself
do you have to deal with 'PBEWithSHAAndTwofish-CBC' thats in BC's API
or you want to change all of that in your client,
and recreate keys with another commands in openSSL than those in link,
but commands must include usage of algorithms that your java security
can accept with no external API.
Come on other forum members!
Take a part in this it's just matter of time when you will face this problems
and your face will look like