Loading

How to Encrypt or Decrypt in Mule Runtime Using Jasypt

Udgivelsesdato: Sep 2, 2025
Opgave

How to encrypt or decrypt a string using the Java library Jasypt, in a Java application with Mule Runtime.

Trin

Currently there is no direct approach to encrypt or decrypt using the jasypt library however the Java Invoke component can be used to achieve this functionality.  The code snippet is as follows, and a simplified application is attached here.

<java:invoke doc:name="Invoke"
        doc:id="fa000ded-xxxxx-1f8a8a6a693e"
        instance="configurationEncryptor"
        class="org.jasypt.encryption.pbe.StandardPBEStringEncryptor"
        method="encrypt(java.lang.String)">
            <java:args><![CDATA[#[arg0: attributes.uriParams.value]]]></java:args>
</java:invoke> 
...    
<java:invoke doc:name="Invoke"
        doc:id="c60b5098-xxxxx-86b5b6cbc789"
        instance="configurationEncryptor"
        class="org.jasypt.encryption.pbe.StandardPBEStringEncryptor"
        method="decrypt(java.lang.String)">
            <java:args><![CDATA[#[arg0: attributes.uriParams.value]]]></java:args>
</java:invoke>
Vidensartikelnummer

001115160

 
Indlæser
Salesforce Help | Article