开发者

Illegalkeysize exception

开发者 https://www.devze.com 2022-12-12 11:42 出处:网络
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_E

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 usin开发者_Python百科g centos operating system)?


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!


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消