java - How can I find verify the encryption strength of my JDK security Providers? -
i have little program prints out of supported providers in jdk installation wondering if knows how can change program print out "strength" of each of providers?
import java.security.provider; import java.security.security; public class securitylistings { public static void main(string[] args) { (provider provider : security.getproviders()) { system.out.println("provider: " + provider.getname()); (provider.service service : provider.getservices()) { system.out.println(" algorithm: " + service.getalgorithm()); } } } }
cipher.getmaxallowedkeylength()
pass in transformation , return highest allowed key.
here easy check
public bool isunlimitedkeystrength() { return cipher.getmaxallowedkeylength("aes") == integer.max_value; }
Comments
Post a Comment