Question

I am using the Bouncy Castle Java cryptographic algorithm implementation. I am getting an IllegalKeySizeException. To overcome this I have even changed my java security jars (local_policy.jar and US_Export_policy.jar), but I am still getting the same problem.

Can anyone suggest a solution for this (I am using centos operating system)?

Was it helpful?

Solution

For it runs on some machines but not on others, the cause can be a missing 'unlimited strength policy file' - found the hint here. Good luck!

OTHER TIPS

Some encryption algorithms expect a fixed key size (or a key that is a multiple of, say, 16 bytes). Pad the key with 0 bytes until it's big enough or truncate it accordingly.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top