Detecting whether an algorithm is supported without creating one?

Wang Weijun weijun.wang at oracle.com
Sun Dec 14 09:13:57 UTC 2014


Unfortunately it does not contain the aliases, say, there is "SHA" but no "SHA-1".

--Max

> On Dec 14, 2014, at 05:12, Peter Levart <peter.levart at gmail.com> wrote:
> 
> Even simpler:
> 
> java.security.Security.getAlgorithms("MessageDigest").contains("SHA-256")
> 
> Regards, Peter
> 




More information about the security-dev mailing list