{"id":20741098,"url":"https://github.com/robtimus/obfuscation-spring","last_synced_at":"2025-04-24T02:53:22.427Z","repository":{"id":53977210,"uuid":"325097858","full_name":"robtimus/obfuscation-spring","owner":"robtimus","description":"Provides Spring and Spring Boot obfuscation support","archived":false,"fork":false,"pushed_at":"2024-11-03T15:47:49.000Z","size":1239,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-24T02:53:14.782Z","etag":null,"topics":["java","obfuscation","spring","spring-boot"],"latest_commit_sha":null,"homepage":"https://robtimus.github.io/obfuscation-spring","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-12-28T19:23:19.000Z","updated_at":"2024-11-03T15:47:10.000Z","dependencies_parsed_at":"2023-02-16T09:46:15.849Z","dependency_job_id":"8ca4a897-ce5c-46ad-afc6-6a79dd525d17","html_url":"https://github.com/robtimus/obfuscation-spring","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robtimus%2Fobfuscation-spring","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robtimus%2Fobfuscation-spring/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robtimus%2Fobfuscation-spring/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robtimus%2Fobfuscation-spring/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robtimus","download_url":"https://codeload.github.com/robtimus/obfuscation-spring/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","spring","spring-boot"],"created_at":"2024-11-17T06:33:46.978Z","updated_at":"2025-04-24T02:53:22.409Z","avatar_url":"https://github.com/robtimus.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# obfuscation-spring\n[![Maven Central](https://img.shields.io/maven-central/v/com.github.robtimus/obfuscation-spring-boot-starter)](https://search.maven.org/artifact/com.github.robtimus/obfuscation-spring-boot-starter)\n[![Build Status](https://github.com/robtimus/obfuscation-spring/actions/workflows/build.yml/badge.svg)](https://github.com/robtimus/obfuscation-spring/actions/workflows/build.yml)\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=com.github.robtimus%3Aobfuscation-spring\u0026metric=alert_status)](https://sonarcloud.io/summary/overall?id=com.github.robtimus%3Aobfuscation-spring)\n[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=com.github.robtimus%3Aobfuscation-spring\u0026metric=coverage)](https://sonarcloud.io/summary/overall?id=com.github.robtimus%3Aobfuscation-spring)\n[![Known Vulnerabilities](https://snyk.io/test/github/robtimus/obfuscation-spring/badge.svg?targetFile=obfuscation-spring-boot-starter/pom.xml)](https://snyk.io/test/github/robtimus/obfuscation-spring?targetFile=obfuscation-spring-boot-starter/pom.xml)\n\nProvides Spring and Spring Boot obfuscation support.\n\nAdd [obfuscation-spring-boot-starter](https://robtimus.github.io/obfuscation-spring/obfuscation-spring-boot-starter/dependency-info.html) as a dependency to your project to get the following:\n\n* Autowire support for [Obfuscator](https://robtimus.github.io/obfuscation-core/apidocs/com/github/robtimus/obfuscation/Obfuscator.html).  \n    Instances of `Obfuscator` can be autowired in two ways:\n    * Annotate an autowired field, constructor argument or method argument with any of the obfuscator annotations of [obfuscation-annotations](https://robtimus.github.io/obfuscation-annotations), and an instance of the matching obfuscator will be autowired.\n    * With no obfuscator annotation present, a default obfuscator is used.\n* Autowire support for [Obfuscated](https://robtimus.github.io/obfuscation-core/apidocs/com/github/robtimus/obfuscation/Obfuscated.html).  \n    Declaring an autowired field, constructor argument or method argument as `Obfuscated` will automatically wrap the autowired field or argument. This supports both autowired values and beans.  \n    The obfuscator to use is determined in one of two ways:\n    * Annotate the field or argument with any of the obfuscator annotations of [obfuscation-annotations](https://robtimus.github.io/obfuscation-annotations) to use the matching obfuscation rules.\n    * With no obfuscator annotation present, a default obfuscator is used.\n\n  The character representation can be specified using [@RepresentedBy](https://robtimus.github.io/obfuscation-annotations/apidocs/com/github/robtimus/obfuscation/annotation/RepresentedBy.html). If this annotation is not present, the [default character representation](https://robtimus.github.io/obfuscation-annotations/apidocs/com/github/robtimus/obfuscation/annotation/CharacterRepresentationProvider.html#getDefaultInstance-java.lang.Class-) is used.\n\nExamples:\n\n    @Autowired\n    @ObfuscateFixedLength(8)\n    private Obfuscator obfuscator;\n\n    @Autowired\n    private Obfuscator defaultObfuscator;\n\n    @Value(\"${property}\")\n    @ObfuscateFixedLength(8)\n    private Obfuscated\u003cString\u003e obfuscatedValue;\n\n    @Autowired\n    @ObfuscateFixedLength(8)\n    @RepresentedBy(MyCharacterRepresentation.class)\n    private Obfuscated\u003cMyBean\u003e obfuscatedBean;\n\n## Default obfuscator\n\nOut-of-the-box, the default obfuscator is [Obfuscator.fixedLength(3)](https://robtimus.github.io/obfuscation-core/apidocs/com/github/robtimus/obfuscation/Obfuscator.html#fixedLength-int-). This can be overridden in two ways:\n\n* Provide a custom bean of type [Obfuscator](https://robtimus.github.io/obfuscation-core/apidocs/com/github/robtimus/obfuscation/Obfuscator.html).\n* Define the default obfuscator in the application properties. See [Properties](https://robtimus.github.io/obfuscation-spring/properties.html) for more information.\n\n## ObfuscatorProvider implementations\n\nIf an [ObfuscatorProvider](https://robtimus.github.io/obfuscation-annotations/apidocs/com/github/robtimus/obfuscation/annotation/ObfuscatorProvider.html) type is already available as a bean, this bean will be used. Otherwise, the type is instantiated using Spring's own bean factory. This allows implementations to use autowired fields.\n\n## Vanilla Spring\n\nThe automatic support for autowiring `Obfuscator` and `Obfuscated` only works when using `obfuscation-spring-boot-starter`. To add obfuscation support to vanilla Spring:\n\n* Add [obfuscation-spring-beans](https://robtimus.github.io/obfuscation-spring/obfuscation-spring-beans/dependency-info.html) as a dependency to your project instead of `obfuscation-spring-boot-starter`.\n* Provide a bean of type [ObfuscatorSupportBeanFactoryPostProcessor](https://robtimus.github.io/obfuscation-spring/apidocs/com/github/robtimus/obfuscation/spring/ObfuscatorSupportBeanFactoryPostProcessor.html) to allow `Obfuscator` to be autowired as above.\n* Provide a bean of type [ObfuscatedSupportBeanFactoryPostProcessor](https://robtimus.github.io/obfuscation-spring/apidocs/com/github/robtimus/obfuscation/spring/ObfuscatedSupportBeanFactoryPostProcessor.html) to allow `Obfuscated` to be autowired as above.\n* Optionally provide a custom bean of type [Obfuscator](https://robtimus.github.io/obfuscation-core/apidocs/com/github/robtimus/obfuscation/Obfuscator.html) to override the default `Obfuscator`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobtimus%2Fobfuscation-spring","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobtimus%2Fobfuscation-spring","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobtimus%2Fobfuscation-spring/lists"}