{"id":19010819,"url":"https://github.com/meltmedia/jackson-crypto","last_synced_at":"2025-04-22T23:22:32.445Z","repository":{"id":21783094,"uuid":"25105479","full_name":"meltmedia/jackson-crypto","owner":"meltmedia","description":"Cryptographic utilities for Jackson","archived":false,"fork":false,"pushed_at":"2016-10-11T21:52:47.000Z","size":89,"stargazers_count":6,"open_issues_count":4,"forks_count":4,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2025-04-17T14:38:58.024Z","etag":null,"topics":["cryptography","encryption","jackson","java","json"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/meltmedia.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-10-12T02:56:32.000Z","updated_at":"2022-12-22T09:47:10.000Z","dependencies_parsed_at":"2022-07-21T20:18:22.276Z","dependency_job_id":null,"html_url":"https://github.com/meltmedia/jackson-crypto","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meltmedia%2Fjackson-crypto","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meltmedia%2Fjackson-crypto/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meltmedia%2Fjackson-crypto/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meltmedia%2Fjackson-crypto/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/meltmedia","download_url":"https://codeload.github.com/meltmedia/jackson-crypto/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250338520,"owners_count":21414203,"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":["cryptography","encryption","jackson","java","json"],"created_at":"2024-11-08T19:12:34.899Z","updated_at":"2025-04-22T23:22:32.425Z","avatar_url":"https://github.com/meltmedia.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Jackson Crypto\n\n[![Build Status](https://travis-ci.org/meltmedia/jackson-crypto.svg?branch=develop)](https://travis-ci.org/meltmedia/jackson-crypto)\n\nCryptographic utilities for Jackson.\n\n## Usage\n\nTo use this package from Maven, include the following dependency in your project:\n\n```\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.meltmedia.jackson\u003c/groupId\u003e\n  \u003cartifactId\u003ejackson-crypto\u003c/artifactId\u003e\n  \u003cversion\u003e0.2.0\u003c/version\u003e\n\u003c/dpendency\u003e\n```\n\nThen create a new CryptoModule and register it with your ObjectMapper.\n\n```\nEncryptionService service = ...;\nObjectMapper mapper = ...;\nmapper.registerModule(new CryptoModule().addSource(service));\n```\n\nOnce this is done, you can use the `@Encrypted` annotation on your `@JsonProperty` annotated methods to encrypt them during serialization and\ndecrypt them during deserialization.  So, a POJO like the following:\n\n```\npublic class Pojo {\n  protected String secret;\n\n  @JsonProperty\n  @Encrypted\n  public String getSecret() {\n    return this.secret;\n  }\n\n  public void setSecret( String secret ) {\n    this.secret = secret;\n  }\n}\n```\n\nwill serialize into JSON like:\n\n```\n{\n  \"secret\": {\n    \"salt\": \"tKD8wQ==\",\n    \"iv\": \"s9hTJRaZn6fxxpA4nVfDag==\",\n    \"value\": \"UZENJOltf+9EZS03AXbmeg==\",\n    \"cipher\": \"aes-256-cbc\",\n    \"keyDerivation\": \"pbkdf2\",\n    \"keyLength\": 256,\n    \"iterations\": 2000\n  }\n}\n```\n\n## Example\n\nThis project does not yet have its own example project, but you can see an example of using this library in the [Dropwizard Crypto example project](https://github.com/meltmedia/dropwizard-crypto/tree/develop/example).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeltmedia%2Fjackson-crypto","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmeltmedia%2Fjackson-crypto","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeltmedia%2Fjackson-crypto/lists"}