{"record":{"id":"84447ae8f323da94","repo":"apereo/cas","slug":"provider-does-not-support-algorithm","errorCode":null,"errorMessage":"Provider: [{}] does not support Algorithm: [{}]","messagePattern":"Provider: \\[(.+?)\\] does not support Algorithm: \\[(.+?)\\]","errorType":"console","errorClass":null,"httpStatus":null,"severity":"info","filePath":"support/cas-server-support-shell-core/src/main/java/org/apereo/cas/shell/commands/jasypt/JasyptTestAlgorithmsCommand.java","lineNumber":66,"sourceCode":"                    LOGGER.trace(\"Testing algorithm [{}]\", algorithmStr);\n                    cipher.setAlgorithm(algorithmStr);\n                    val encryptedValue = cipher.encryptValue(value, e -> {\n                        LOGGER.trace(e.getMessage(), e);\n                        return null;\n                    });\n                    if (encryptedValue == null) {\n                        continue;\n                    }\n                    LOGGER.info(\"Provider: [{}] Algorithm: [{}]\", provider, algorithmStr);\n                    val result = cipher.decryptValue(encryptedValue);\n                    FunctionUtils.doIf(result != null,\n                            r -> LOGGER.info(\"Encrypted Value: [{}] Decryption succeeded\", encryptedValue),\n                            t -> LOGGER.warn(\"Encrypted Value: [{}] Decryption Failed\", encryptedValue))\n                        .accept(result);\n\n                } catch (final Exception e) {\n                    if (e.getCause() instanceof NoSuchAlgorithmException) {\n                        LOGGER.warn(\"Provider: [{}] does not support Algorithm: [{}]\", provider, algorithmStr);\n                    } else {\n                        LOGGER.warn(\"Error encrypting using provider: [{}] and algorithm: [{}], Message: [{}]\", provider, algorithmStr, e.getMessage());\n                    }\n                }\n            }\n        }\n    }\n}\n","sourceCodeStart":48,"sourceCodeEnd":75,"githubUrl":"https://github.com/apereo/cas/blob/e7288fc434b4f4505b8452e1a57e8fb3111bb863/support/cas-server-support-shell-core/src/main/java/org/apereo/cas/shell/commands/jasypt/JasyptTestAlgorithmsCommand.java#L48-L75","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"// before (JDK 8 without needed provider)\nalgorithm = PBEWITHHMACSHA512ANDAES_256 // NoSuchAlgorithmException\n// after\n// run on JDK 11+ or register BouncyCastle provider","handlingStrategy":"try-catch","validationCode":"// Check algorithm availability up front:\nCipher.getInstance(algorithm, provider);","typeGuard":null,"tryCatchPattern":"try {\n    cipher.encryptValue(value);\n} catch (Exception e) {\n    if (e.getCause() instanceof NoSuchAlgorithmException) {\n        // provider lacks algorithm; skip combination\n    } else {\n        throw e;\n    }\n}","preventionTips":["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."],"tags":["jasypt","jce","crypto","provider"],"backgroundTag":"unsupported-operation","analyzedSha":"e7288fc434b4f4505b8452e1a57e8fb3111bb863","analyzedAt":"2026-09-08T15:39:16.015Z","contentChangedAt":"2026-09-08T15:39:16.015Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}