The JCE Specification lists standard names that an implementation is expected to support. “SHA-1” is specified, as are SHA-256, SHA-384, and SHA-512. “SHA”, “SHA-0″ and SHA-2” are not standard names and therefore may not be supported at all. You cannot guarantee what “SHA” will return, if anything at all, because it is not in the standard.