I tried to anonymize a paper with black highlights, thinking it was a good and easy way (even though I could not figure out yet how to do it in the references and citations, since it is my first document in LaTex). However, if I copy-paste my text from the generated pdf to a text editor, all the hidden texts appear.
I had then the idea to create a command that would take the desired string to hide as input parameter. This command would change every character of the input string into an asterisk for instance. This command should work also for the references and citations. For the moment I managed to do it using macros (like #ifdef format), which make me write my paragraphs that include strings to anonymize twice. And I don't even know how to do the same in the bib file.
If an expert could give me pieces of code to include I don't know where but that do the trick, I would be very grateful.