/** * Constructor. * * @param criteria the criteria which is the basis for evaluation */ public EvaluableKeyLengthCredentialCriteria(KeyLengthCriteria criteria) { if (criteria == null) { throw new NullPointerException("Criteria instance may not be null"); } keyLength = criteria.getKeyLength(); }
/** * Constructor. * * @param length key length */ public KeyLengthCriteria(Integer length) { setKeyLength(length); }
critSet.add(lengthCrit); log.debug("Added decryption key length criteria from EncryptionMethod algorithm URI: {}", lengthCrit .getKeyLength()); } else { if (encMethod.getKeySize() != null && encMethod.getKeySize().getValue() != null) { lengthCrit = new KeyLengthCriteria(encMethod.getKeySize().getValue()); critSet.add(lengthCrit); log.debug("Added decryption key length criteria from EncryptionMethod/KeySize: {}", lengthCrit .getKeyLength());
/** * Dynamically construct key length credential criteria based on the specified algorithm URI. * * @param encAlgorithmURI the algorithm URI * @return a new key length credential criteria instance, or null if the value could not be determined */ private KeyLengthCriteria buildKeyLengthCriteria(String encAlgorithmURI) { if (!DatatypeHelper.isEmpty(encAlgorithmURI)) { return null; } Integer keyLength = SecurityHelper.getKeyLengthFromURI(encAlgorithmURI); if (keyLength != null) { return new KeyLengthCriteria(keyLength); } return null; }
critSet.add(lengthCrit); log.debug("Added decryption key length criteria from EncryptionMethod algorithm URI: {}", lengthCrit .getKeyLength()); } else { if (encMethod.getKeySize() != null && encMethod.getKeySize().getValue() != null) { lengthCrit = new KeyLengthCriteria(encMethod.getKeySize().getValue()); critSet.add(lengthCrit); log.debug("Added decryption key length criteria from EncryptionMethod/KeySize: {}", lengthCrit .getKeyLength());
/** * Dynamically construct key length credential criteria based on the specified algorithm URI. * * @param encAlgorithmURI the algorithm URI * @return a new key length credential criteria instance, or null if the value could not be determined */ private KeyLengthCriteria buildKeyLengthCriteria(String encAlgorithmURI) { if (!DatatypeHelper.isEmpty(encAlgorithmURI)) { return null; } Integer keyLength = SecurityHelper.getKeyLengthFromURI(encAlgorithmURI); if (keyLength != null) { return new KeyLengthCriteria(keyLength); } return null; }
/** * Constructor. * * @param length key length */ public KeyLengthCriteria(Integer length) { setKeyLength(length); }
/** * Constructor. * * @param criteria the criteria which is the basis for evaluation */ public EvaluableKeyLengthCredentialCriteria(KeyLengthCriteria criteria) { if (criteria == null) { throw new NullPointerException("Criteria instance may not be null"); } keyLength = criteria.getKeyLength(); }