public class CryptoUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
ALLOW_CUSTOM_CIPHER_PROPERTY |
static String |
ALLOW_NON_STANDARD_KEY_SIZE_PROPERTY |
static String |
ALLOW_REGISTRATION_XMLDSIG_PROPERTY
Deprecated.
|
static String |
LEGACY_KDF_PROPERTY |
static String |
LEGACY_SUN_PROVIDER_PROPERTY |
static String |
XML_DSIG_PROVIDER_CLASS_NAME
The fully qualified class name of the Apache Santuario XMLDSig provider.
|
static String |
XMLDSIG_PROVIDER_NAME |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
allowLegacyDecryptionKdf() |
static boolean |
allowLegacyDecryptionSunProvider() |
static Optional<Provider> |
getBcSecurityProviderIfApplicable() |
static String |
getSafeErrorMessage(Throwable e,
String defaultMessage)
Gets a safe error message from an exception, prioritizing the most specific message available.
|
static Optional<Provider> |
getXMLDSigProvider()
Gets the XMLDSig provider if one is already registered globally.
|
static boolean |
isFipsEnabled()
Checks if FIPS is enabled.
|
static boolean |
isXMLDSigRegistrationAllowedInFips()
Deprecated.
This method is deprecated as of version 2.1.0 and will be removed in a future version. XMLDSig provider
registration in FIPS mode should be handled through alternative mechanisms.
|
public static final String LEGACY_KDF_PROPERTY
public static final String LEGACY_SUN_PROVIDER_PROPERTY
@Deprecated public static final String ALLOW_REGISTRATION_XMLDSIG_PROPERTY
public static final String ALLOW_CUSTOM_CIPHER_PROPERTY
public static final String ALLOW_NON_STANDARD_KEY_SIZE_PROPERTY
public static final String XMLDSIG_PROVIDER_NAME
public static final String XML_DSIG_PROVIDER_CLASS_NAME
public static boolean isFipsEnabled()
@Deprecated public static boolean isXMLDSigRegistrationAllowedInFips()
com.mulesoft.connectors.allow-registration-of-xmldsig-provider-in-fips is set to
truepublic static Optional<Provider> getXMLDSigProvider()
This method only checks for existing globally registered providers. It does NOT load or register providers. Provider loading
and registration is handled by XmlKeyImpl which loads the
provider in the current classloader to avoid classloader issues in MUnit tests.
public static Optional<Provider> getBcSecurityProviderIfApplicable()
public static boolean allowLegacyDecryptionKdf()
public static boolean allowLegacyDecryptionSunProvider()
public static String getSafeErrorMessage(Throwable e, String defaultMessage)
e - The exception to get the message fromdefaultMessage - The default message to use if no specific message is foundCopyright © 2026 MuleSoft, Inc.. All rights reserved.