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>
Knowledge 기사 번호

001115160

 
로드 중
Salesforce Help | Article