programmatically discover java unlimited encryption

ⅰ亾dé卋堺 提交于 2019-12-06 06:10:46

Probably not the cleanest way:

If it is not there your application should throw an Exception, so you could try a small encryption test that is supposed to work and catch that exception. That's what I do with Bounty Castle.

I suppose you could also check the installed libraries (it looks like the Manisfest within the JAR files contains the strength).

Turns out, as GregS points out above, that the program was not failing silently, but swallowing the exception. The call to KeyStore.store() was throwing an IOException that I was catching with a generic catch (Exception e) farther below. Once catching the IOException separately, the program now works properly.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!