Loading

How to Encrypt or Decrypt in Mule Runtime Using Jasypt

公開日: Sep 2, 2025
タスク

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

ステップ

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>
ナレッジ記事番号

001115160

 
読み込み中
Salesforce Help | Article