@Test public void testUnknownSignatureAndHashAlgorithmCauseException() throws GeneralSecurityException { exception.expect(GeneralSecurityException.class); exception.expectMessage(containsString("UNKNOWN")); SignatureAndHashAlgorithm algo = new SignatureAndHashAlgorithm(80, 64); algo.getThreadLocalSignature().currentWithCause(); }
public static ThreadLocalSignature getThreadLocalSignature(String algorithm) { if (algorithm == null) { algorithm = "UNKNOWN"; } return ThreadLocalSignature.SIGNATURES.get(algorithm); }
SignatureAndHashAlgorithm { public static ThreadLocalSignature getThreadLocalSignature(String algorithm) { if (algorithm == null) { algorithm = "UNKNOWN"; } return ThreadLocalSignature.SIGNATURES.get(algorithm); } }
SignatureAndHashAlgorithm { public static ThreadLocalSignature getThreadLocalSignature(String algorithm) { if (algorithm == null) { algorithm = "UNKNOWN"; } return ThreadLocalSignature.SIGNATURES.get(algorithm); } SignatureAndHashAlgorithm(HashAlgorithm hashAlgorithm, SignatureAlgorithm signatureAlgorithm);  SignatureAndHashAlgorithm(int hashAlgorithmCode, int signatureAlgorithmCode); }
SignatureAndHashAlgorithm { public static ThreadLocalSignature getThreadLocalSignature(String algorithm) { if (algorithm == null) { algorithm = "UNKNOWN"; } return ThreadLocalSignature.SIGNATURES.get(algorithm); } SignatureAndHashAlgorithm(HashAlgorithm hashAlgorithm, SignatureAlgorithm signatureAlgorithm);  SignatureAndHashAlgorithm(int hashAlgorithmCode, int signatureAlgorithmCode); static ThreadLocalSignature getThreadLocalSignature(String algorithm); static SignatureAndHashAlgorithm valueOf(String jcaName); static List<SignatureAndHashAlgorithm> getDefaultSignatureAlgorithms(
			List<X509Certificate> certificateChain); static List<SignatureAndHashAlgorithm> getDefaultSignatureAlgorithms(
			PublicKey publicKey); static List<SignatureAndHashAlgorithm> getCommonSignatureAlgorithms(
			List<SignatureAndHashAlgorithm> proposedSignatureAndHashAlgorithms,
			List<SignatureAndHashAlgorithm> supportedSignatureAndHashAlgorithms); static SignatureAndHashAlgorithm getSupportedSignatureAlgorithm(
			List<SignatureAndHashAlgorithm> supportedSignatureAlgorithms, PublicKey key); static List<SignatureAndHashAlgorithm> getEcdsaCompatibleSignatureAlgorithms(
			List<SignatureAndHashAlgorithm> signatureAndHashAlgorithms); static boolean isSignedWithSupportedAlgorithms(List<SignatureAndHashAlgorithm> supportedSignatureAlgorithms,
			List<X509Certificate> certificateChain); SignatureAlgorithm getSignature(); HashAlgorithm getHash(); String getJcaName(); @Deprecated String jcaName(); boolean isSupported(); @Override String toString(); @Override boolean equals(Object obj); @Override int hashCode(); ThreadLocalSignature getThreadLocalSignature(); }
SignatureAndHashAlgorithm { public static ThreadLocalSignature getThreadLocalSignature(String algorithm) { if (algorithm == null) { algorithm = "UNKNOWN"; } return ThreadLocalSignature.SIGNATURES.get(algorithm); } SignatureAndHashAlgorithm(HashAlgorithm hashAlgorithm, SignatureAlgorithm signatureAlgorithm);  SignatureAndHashAlgorithm(int hashAlgorithmCode, int signatureAlgorithmCode); static ThreadLocalSignature getThreadLocalSignature(String algorithm); static SignatureAndHashAlgorithm valueOf(String jcaName); static List<SignatureAndHashAlgorithm> getDefaultSignatureAlgorithms(
			List<X509Certificate> certificateChain); static List<SignatureAndHashAlgorithm> getDefaultSignatureAlgorithms(
			PublicKey publicKey); static List<SignatureAndHashAlgorithm> getCommonSignatureAlgorithms(
			List<SignatureAndHashAlgorithm> proposedSignatureAndHashAlgorithms,
			List<SignatureAndHashAlgorithm> supportedSignatureAndHashAlgorithms); static SignatureAndHashAlgorithm getSupportedSignatureAlgorithm(
			List<SignatureAndHashAlgorithm> supportedSignatureAlgorithms, PublicKey key); static List<SignatureAndHashAlgorithm> getEcdsaCompatibleSignatureAlgorithms(
			List<SignatureAndHashAlgorithm> signatureAndHashAlgorithms); static boolean isSignedWithSupportedAlgorithms(List<SignatureAndHashAlgorithm> supportedSignatureAlgorithms,
			List<X509Certificate> certificateChain); SignatureAlgorithm getSignature(); HashAlgorithm getHash(); String getJcaName(); @Deprecated String jcaName(); boolean isSupported(); @Override String toString(); @Override boolean equals(Object obj); @Override int hashCode(); ThreadLocalSignature getThreadLocalSignature(); static SignatureAndHashAlgorithm SHA1_WITH_ECDSA; static SignatureAndHashAlgorithm SHA256_WITH_ECDSA; static SignatureAndHashAlgorithm SHA384_WITH_ECDSA; static SignatureAndHashAlgorithm SHA256_WITH_RSA; static SignatureAndHashAlgorithm INTRINSIC_WITH_ED25519; static SignatureAndHashAlgorithm INTRINSIC_WITH_ED448; static List<SignatureAndHashAlgorithm> DEFAULT; }