Class AlgorithmPredicates
- java.lang.Object
-
- se.swedenconnect.security.algorithms.AlgorithmPredicates
-
public class AlgorithmPredicates extends Object
A set of "ready-to-go" predicates to use when searching for algorithms in theAlgorithmRegistry.- Author:
- Martin Lindström (martin@idsec.se), Stefan Santesson (stefan@idsec.se)
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Predicate<Algorithm>fromAlgorithmIdentifier(org.bouncycastle.asn1.x509.AlgorithmIdentifier algorithmIdentifier)Predicate for finding an algorithm based on itsAlgorithmIdentifier.static Predicate<Algorithm>fromAlgorithmIdentifierRelaxed(org.bouncycastle.asn1.x509.AlgorithmIdentifier algorithmIdentifier)Predicate for finding an algorithm based on itsAlgorithmIdentifier.static Predicate<Algorithm>fromJcaName(String jcaName)Predicate for finding an algorithm based on its JCA name.static Predicate<Algorithm>fromKeyType(String keyType)Predicate for finding an algorithm based on its key type.static Predicate<Algorithm>fromType(AlgorithmType type)Predicate for finding an algorithm based on its type.static Predicate<Algorithm>notBlacklisted()A predicate that can be combined with other predicates to ensure that the resultingAlgorithmis not blacklisted.
-
-
-
Method Detail
-
notBlacklisted
public static Predicate<Algorithm> notBlacklisted()
A predicate that can be combined with other predicates to ensure that the resultingAlgorithmis not blacklisted.- Returns:
- a predicate
-
fromJcaName
public static Predicate<Algorithm> fromJcaName(String jcaName)
Predicate for finding an algorithm based on its JCA name.- Parameters:
the- JCA name- Returns:
- a predicate
-
fromType
public static Predicate<Algorithm> fromType(AlgorithmType type)
Predicate for finding an algorithm based on its type.- Parameters:
type- the algorithm type- Returns:
- a predicate
-
fromKeyType
public static Predicate<Algorithm> fromKeyType(String keyType)
Predicate for finding an algorithm based on its key type.- Parameters:
keyType- the key type- Returns:
- a predicate
-
fromAlgorithmIdentifier
public static Predicate<Algorithm> fromAlgorithmIdentifier(org.bouncycastle.asn1.x509.AlgorithmIdentifier algorithmIdentifier)
Predicate for finding an algorithm based on itsAlgorithmIdentifier.- Parameters:
algorithmIdentifier- the algorithm identifier- Returns:
- a predicate
-
fromAlgorithmIdentifierRelaxed
public static Predicate<Algorithm> fromAlgorithmIdentifierRelaxed(org.bouncycastle.asn1.x509.AlgorithmIdentifier algorithmIdentifier)
Predicate for finding an algorithm based on itsAlgorithmIdentifier. The method implementation is "relaxed" which means that if no parameters are supplied in thealgorithmIdentifierthe comparison of parameters will be excluded. This covers for the case when the special NULL param is used.Also, for RSA-PSS, we compare only the digest part of the parameters.
- Parameters:
algorithmIdentifier- the algorithm identifier- Returns:
- a predicate
-
-