{"id":20741110,"url":"https://github.com/robtimus/obfuscation-core","last_synced_at":"2025-04-24T02:53:42.858Z","repository":{"id":53933308,"uuid":"260904834","full_name":"robtimus/obfuscation-core","owner":"robtimus","description":"Provides functionality for obfuscating text","archived":false,"fork":false,"pushed_at":"2024-07-27T14:31:41.000Z","size":1008,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-24T02:53:36.886Z","etag":null,"topics":["java","obfuscation"],"latest_commit_sha":null,"homepage":"https://robtimus.github.io/obfuscation-core","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/robtimus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-05-03T12:04:25.000Z","updated_at":"2024-10-21T16:29:26.000Z","dependencies_parsed_at":"2024-07-27T15:42:44.046Z","dependency_job_id":"870005b5-75e0-49fe-87dc-d5a20224c28c","html_url":"https://github.com/robtimus/obfuscation-core","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robtimus%2Fobfuscation-core","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robtimus%2Fobfuscation-core/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robtimus%2Fobfuscation-core/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robtimus%2Fobfuscation-core/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robtimus","download_url":"https://codeload.github.com/robtimus/obfuscation-core/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250552037,"owners_count":21449162,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["java","obfuscation"],"created_at":"2024-11-17T06:33:52.591Z","updated_at":"2025-04-24T02:53:42.842Z","avatar_url":"https://github.com/robtimus.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# obfuscation-core\n[![Maven Central](https://img.shields.io/maven-central/v/com.github.robtimus/obfuscation-core)](https://search.maven.org/artifact/com.github.robtimus/obfuscation-core)\n[![Build Status](https://github.com/robtimus/obfuscation-core/actions/workflows/build.yml/badge.svg)](https://github.com/robtimus/obfuscation-core/actions/workflows/build.yml)\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=com.github.robtimus%3Aobfuscation-core\u0026metric=alert_status)](https://sonarcloud.io/summary/overall?id=com.github.robtimus%3Aobfuscation-core)\n[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=com.github.robtimus%3Aobfuscation-core\u0026metric=coverage)](https://sonarcloud.io/summary/overall?id=com.github.robtimus%3Aobfuscation-core)\n[![Known Vulnerabilities](https://snyk.io/test/github/robtimus/obfuscation-core/badge.svg)](https://snyk.io/test/github/robtimus/obfuscation-core)\n\nProvides functionality for obfuscating text. This can be useful for logging information that contains sensitive information.\n\nBesides providing a framework that can be extended to provide simple or complex obfuscators, this library comes with a small set of predefined obfuscators.\nMost can be found through factory methods on class [Obfuscator](https://robtimus.github.io/obfuscation-core/apidocs/com/github/robtimus/obfuscation/Obfuscator.html).\nSee [Examples](https://robtimus.github.io/obfuscation-core/examples.html) for more information.\n\n## Streaming obfuscation\n\nAn `Obfuscator` has method `streamTo` which takes a `StringBuilder`, `Writer` or other `Appendable`, and returns a `Writer` that will obfuscate the written text automatically.\n\n## Preventing leaking string representations\n\nThe following methods of `Obfuscator` can be used to help prevent accidentally leaking string representations of objects, for instance by logging them:\n\n* `obfuscateList`, `obfuscateSet` and `obfuscateCollection` create `List`, `Set` and `Collection` decorators respectively that obfuscate separate elements when calling `toString()`.\n* `obfuscateMap` creates a `Map` decorator that obfuscates separate values (but not keys) when calling `toString()`.\n* `obfuscateObject` creates a wrapper around an existing object that obfuscates the object when calling `toString()`.\n\n## Obfuscating complex structures\n\nBesides obfuscating simple text, it's possible to obfuscate complex structures using the following classes and libraries:\n\n* [MapObfuscator](https://robtimus.github.io/obfuscation-core/apidocs/com/github/robtimus/obfuscation/MapObfuscator.html) can obfuscate maps by providing a separate `Obfuscator` for each entry. Entries can even have no obfuscation at all.\n* [PropertiesObfuscator](https://robtimus.github.io/obfuscation-core/apidocs/com/github/robtimus/obfuscation/PropertiesObfuscator.html) can obfuscate `Properties` objects by providing a separate `Obfuscator` for each property. Properties can even have no obfuscation at all.\n* [obfuscation-commons-lang](https://robtimus.github.io/obfuscation-commons-lang/) provides extensions to [Apache Commons Lang](https://commons.apache.org/proper/commons-lang/) for obfuscating objects.\n* [obfuscation-http](https://robtimus.github.io/obfuscation-http/) provides support for obfuscating HTTP requests and responses.\n* [obfuscation-jackson](https://robtimus.github.io/obfuscation-jackson/) and [obfuscation-json](https://robtimus.github.io/obfuscation-json/) provide support for obfuscating properties in JSON documents.\n* [obfuscation-xml](https://robtimus.github.io/obfuscation-xml/) provides support for obfuscating properties in XML documents.\n* [obfuscation-yaml](https://robtimus.github.io/obfuscation-yaml/) provides support for obfuscating properties in YAML documents.\n\n## Writing custom obfucators\n\nPackage [com.github.robtimus.obfuscation.support](https://robtimus.github.io/obfuscation-core/apidocs/com/github/robtimus/obfuscation/support/package-summary.html) provides several classes that can be used to create custom obfuscators.\n\n## Extensions\n\n* [obfuscation-annotations](https://robtimus.github.io/obfuscation-annotations/) provides general purpose `Obfuscator` annotations.\n* [obfuscation-jackson-databind](https://robtimus.github.io/obfuscation-jackson-databind/) provides integration with [jackson-databind](https://github.com/FasterXML/jackson-databind).\n* [obfuscation-spring](https://robtimus.github.io/obfuscation-spring/) provides integration with [Spring](https://spring.io/) and [Spring Boot](https://spring.io/projects/spring-boot).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobtimus%2Fobfuscation-core","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobtimus%2Fobfuscation-core","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobtimus%2Fobfuscation-core/lists"}