Oracle Community Directory
Oracle Community FAQ
Go Directly To
Oracle Developer Community
My Oracle Support Community
OPN Cloud Connection
Oracle Employee Community
Oracle User Group Community
Please enter a title.
You can not post a blank message. Please type your message and try again.
This discussion is archived
on Mar 21, 2003 1:48 PM by 843810
Blowfish Key Question
Mar 20, 2003 7:48 PM
I am playing around with the crypto packages, and have run into a problem that I can't quite figure out.
KeyGenerator kg = KeyGenerator.getInstance(cryptoMethod);
SecretKey genKey = kg.generateKey();
sKeySpec = new SecretKeySpec(passPhrase.getBytes("UTF-8"), cryptoMethod);
Here, I create a SecretKeySpec... if passPhrase.getBytes() > 16, I get this exception:
java.lang.SecurityException: Unsupported keysize or algorithm parameters
If it's passPhrase.getBytes() <= 16, it works just fine (encryption/decryption and all).
cryptoMethod is currently "Blowfish", of course.
Am I missing something here?
Thank you for your time!
This content has been marked as final.
Show 1 reply
Re: Blowfish Key Question
Mar 21, 2003 1:48 PM
in response to
Yep. You should use PBE spec if you like to work with a passphrase.