apereo/cas · info
Provider: [ ] does not support Algorithm: [ ]
Error message
Provider: [{}] does not support Algorithm: [{}] What it means
In JasyptTestAlgorithmsCommand.validateAlgorithms, when attempting a test encryption/decryption throws an exception whose cause is NoSuchAlgorithmException, the provider is logged with this warning: it does not offer the requested algorithm. That provider/algorithm combination is skipped and validation continues with the next candidate.
Solutions
- Ignore the warning for providers that simply lack the algorithm; the command continues testing other combinations.
- Install/enable a provider supporting the desired algorithm (e.g. BouncyCastle) if you specifically need that algorithm.
- Use a newer JDK that ships the modern PBEWithHmacSHA*AndAES algorithms.
Example fix
// before (JDK 8 without needed provider) algorithm = PBEWITHHMACSHA512ANDAES_256 // NoSuchAlgorithmException // after // run on JDK 11+ or register BouncyCastle provider
Defensive patterns
Strategy: try-catch
Validate before calling
// Check algorithm availability up front: Cipher.getInstance(algorithm, provider);
Try / catch
try {
cipher.encryptValue(value);
} catch (Exception e) {
if (e.getCause() instanceof NoSuchAlgorithmException) {
// provider lacks algorithm; skip combination
} else {
throw e;
}
} Prevention
- Sweeping providers means unsupported algorithms are expected; treat this as informational.
- Register BouncyCastle if you need algorithms missing from the default JVM.
- Use a recent JDK to maximize available PBE/AES algorithms.
When it happens
Trigger: Iterating all installed JCE providers and requesting an algorithm name one of them does not implement — normal behavior when sweeping the algorithm matrix; also occurs when the algorithm string is misspelled or requires a provider not installed in the JVM.
Common situations: Running the shell command on a JVM without unlimited-strength policy or missing an AES-GCM/PBKDF2 provider; older JDKs lacking newer PBE algorithms; expecting every provider to support every algorithm.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- Error encrypting using provider
- Encrypted Value: [ ] Decryption Failed
- Not all requested multifactor providers could be found…
- Unsupported key type:
- No federation keys defined for entity
AI-assisted analysis of apereo/cas@e7288fc434 (2026-09-08).
Data as JSON: /api/errors/84447ae8f323da94.
Report an issue: GitHub.
Appendix: source
Thrown at support/cas-server-support-shell-core/src/main/java/org/apereo/cas/shell/commands/jasypt/JasyptTestAlgorithmsCommand.java:66
LOGGER.trace("Testing algorithm [{}]", algorithmStr);
cipher.setAlgorithm(algorithmStr);
val encryptedValue = cipher.encryptValue(value, e -> {
LOGGER.trace(e.getMessage(), e);
return null;
});
if (encryptedValue == null) {
continue;
}
LOGGER.info("Provider: [{}] Algorithm: [{}]", provider, algorithmStr);
val result = cipher.decryptValue(encryptedValue);
FunctionUtils.doIf(result != null,
r -> LOGGER.info("Encrypted Value: [{}] Decryption succeeded", encryptedValue),
t -> LOGGER.warn("Encrypted Value: [{}] Decryption Failed", encryptedValue))
.accept(result);
} catch (final Exception e) {
if (e.getCause() instanceof NoSuchAlgorithmException) {
LOGGER.warn("Provider: [{}] does not support Algorithm: [{}]", provider, algorithmStr);
} else {
LOGGER.warn("Error encrypting using provider: [{}] and algorithm: [{}], Message: [{}]", provider, algorithmStr, e.getMessage());
}
}
}
}
}
}
View on GitHub (pinned to e7288fc434)