Does anyone know the Mule 4 equivalent to the following Mule 3 code?
<expression-component doc:name="TECH_Heroku_PartKey"><![CDATA[
payload=com.google.common.hash.Hashing.sha1().hashBytes(payload.getBytes("UTF-8"));
]]></expression-component>
The hashWith() can be used in DataWeave 2 to generate a hash with different algorithm, including SHA1.
You need to be mindful that the result may vary depending on what the payload is. I'm guessing that in Mule 3 you are converting a Java string into bytes. In Mule 4 the hashWith() function expects a binary. You will to test it.
Alternatively you could put the same code in a Java method and call it using the Java Module.