Hi @Christel_Doudet, I am afraid I don’t speak PHP, so wouldn’t be able to confirm the exact equivalent of your PHP snippet.
The StackOverflow thread you have linked suggests it might be a charset problem. Could you share some example data you are working with and on which you’re unable to perform the hmac action from your example? Your expression references an Import node, but it’s not clear to me what kind of node this is or what it does.
It would be great if you could also confirm the PHP output for your example data, so people can see the difference.
Edit: If the charset is the problem and your data is simply the response to an HTTP Request, you could try this approach to set the correct encoding: