Do you mean encrypting data? if so then you can achieve that by using Encryption module from app store.
If you mean not to expose the data at all in UI then you can add XPath constraints to restrict data which you don't want to show on the page.
You can create a java action with string as input and output parameters, e.g. pass in the input value that you want to mask as string and get the value masked within the java action and pass out the masked value then show this in the UI. Also, you can achieve this in a microflow by looping over each object and changing the input values (there can be performance impact depending on the number of items in the loop). Please find links to some example java code that I found on google;
Hope this helps!