I am sending a java object like user information in rest web service call and display the some information in angularjs controller $http.post call response as data
Below is my piece of code in rest web service call
public @ResponseBody getEmployeeDetails(int id){
Employee employee = getDetailsFromDB(id);
return Response.put(employee).build();
}
In angularjs controller i am getting as
$http.post("./rest/getEmployeeDetails").then(function(data){
var employee = data;
});
So in browser networks, in response i can see the response data clearly like
data: "Name": "Bri Squared", "Role": "Admin", "Mobile": "9829399402"
In this case i need to hide the information, so i need to encrypt and decrypt data. Can anyone suggest me any idea for encryption and decryption between rest web service call and response in angularjs controller?