While calling from one module to another I am facing hash mismatch issue. Hash is first generated in caller module using request parameters and sent to called module in Request Header. Called module then generates hash from request and validates if newly generated hash matches or not. While verifying in test environment it works fine but still facing issue in prod environment. I am using RestTemplate for HTTP call and HMAC with SHA256 for hashing. I have also tried adding httpMessageConverter for unicode support but still facing the issue.
Hash matches if unicode value is removed.
Hash matches in test environment but fails in prod even if all the configurations are same like java version, tomcat version and so on.
Tried adding message converters but still facing the isssue.
RestTemplate restTemplate = new RestTemplate(); restTemplate.getMessageConverters() .add(0, new StringHttpMessageConverter(StandardCharsets.UTF_8));