Below is the data, which is being logged. I need to encrypt string (Numbermr), so that it doesn't show the value in logs as plain txt. Any idea on how to encrypt this string(Numbermr) in java using google cloud KMS?
** * To log data
*/
public void logAuditInput(AssignmentInformation assignmentInformation, JSONObject jONObject, String modelHashWithProject, String api_version)
{
JSONObject recordsJson = new JSONObject();
recordsJson.put("uuid", asgnmntInfo.getScoringTicketUUID());
recordsJson.put("Numbermr", asgnmntInfo.getNumbermr());
recordsJson.put("timestamp", LocalDateTime.now().toString());
LOG.debug(recordsJson.toString());
}