Loading

How to Encrypt or Decrypt in Mule Runtime Using Jasypt

Veröffentlichungsdatum: Sep 2, 2025
Aufgabe

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

Schritte

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>
Nummer des Knowledge-Artikels

001115160

 
Laden
Salesforce Help | Article