<!-- For the sake of this example, let's say this value comes from an API response. -->
<arc:set attr="secret.value" value="FooBar" />
<!-- Set both the Key and IV values. These are the names of the encrypted vault items. -->
<!-- If using the default AES algorithm, the values stored in each vault item need to be 128-bit HEX values. -->
<arc:set attr="input.keyVaultEntry" value="key"/>
<arc:set attr="input.ivVaultEntry" value="iv"/>
<!-- Default algorithm is AES -->
<arc:set attr="input.algorithm" value="AES" />
<!-- Pass in the input item and call cryptoEncrypt -->
<arc:set attr="input.data" value="[secret.value]"/>
<arc:call op="cryptoEncrypt" in="input" out="result" >
<!-- Here is where you can use the newly encrypted value/data. A message header is used here. -->
<arc:set attr="output.Header:MyEncryptedValue" value="[result.data]" />
</arc:call>
<!-- Push the input message, with the new header, as output. -->
<arc:set attr="output.filepath" value="[Filepath]" />
<arc:push item="output" />