The Hash Transformer can be used to calculate a hash value.
The Hash Module contains an encoder that receives Mule Messages from the Mule Project and calculates a hash value.
Hash Encode Module
The Hash Encode operation allows you to compute a hash using various algorithms. To use the Hash Module, simply select an Algorithm. The module will compute a hash over the data in the incoming message payload at runtime.
If using an HMAC algorithm, you will also need to set the Key property to the secret key for the hash computation.
To hex encode the hash value set EncodeHash to True.
Add a File Read connector in front of the Hash Encode Module and configure it to read a particular target file. Select an Algorithm for the Encode operation. That is all that is required to hash the file. The calculated hash is written to the message payload.
Add a Set Payload Transformer in front of the Hash Encode Module and set the message payload to a string. Select an Algorithm for the Encode operation. That is all that is required to hash the string. The calculated hash is written to the message payload.
Encoder Property List
The following is the full list of the properties of the encoder module with short descriptions. Click on the links for further details.
|Algorithm||The algorithm used to create the hash.|
|EncodeHash||Whether the hash value is hex encoded.|
|Key||The secret key for the hash algorithm.|
|Other||Defines a set of configuration settings to be used by the transformer.|
|RuntimeLicense||Specifies the connector runtime license key.|
The following is a list of configuration settings for the module with short descriptions. Click on the links for further details.