I need a function (Java/Kotlin) that returns hashMessage which corresponds to Solidity function:
function getMessageHash(address _signer, uint _amount, uint _id) public pure returns (bytes32) {
return keccak256(abi.encodePacked(_signer, _amount, _id));
}
This function should return value of format: hash = "0xcf36ac4f97dc10d91fc2cbb20d718e94a8cbfe0f82eaedc6a4aa38946fb797cd"
I've tried using Hash.sha3(String hexInput). from the org.web3j.crypto.Hash package but it only accepts one parameter. I can't figure out what does abi.encodePacked() is doing with parameters under the "hood".