This little tool enables to anonymize any String or Number while retaining its original formatting.
<p class="test"><a href="test.com">p class test a href Test DiFfErEnT CASES 123456789 someone@email.com</a></p>
//pass the boolean flag that tells the Anonymizer we are dealing with HTML/XML
HumanReadableAnonymizer.anonymize(source, true);
<p class="test"><a href="test.com">u vitae nisl a urna Nisl TiNcIdUnT IPSUM 368038353 posuere@purus.est</a></p>
We can easily "ipsumify" any given input String without losing any of its original formatting (and HTML/XML Tags)
It is very often difficult to reproduce bugs that are happening on PROD Environments. It would always be best to be able to just take a dump of Production Data and load it locally to perform the debug. However, more often than not we can't do this because PROD contains Client-owned data that we (as developers) shouldn't have access to. One use case of this tool (and the reason it was created) is the ability to anonymize such dumps to get rid of Client-sensitive data without losing any of the original formatting and structure of the data.
Add Maven Repository:
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
Add Maven Dependency:
<dependency>
<groupId>com.github.eXsio</groupId>
<artifactId>hr-anon</artifactId>
<version>1.0.4</version>
</dependency>
class HumanReadableAnonymizer;
public static String anonymize(String source, boolean isHtmlOrXml);
public static <T extends Number> T anonymize(T source);
public static String anonymizeTelephone(String string);