{"id":16687994,"url":"https://github.com/danielpclark/aes_keeper","last_synced_at":"2026-04-28T14:05:01.429Z","repository":{"id":25570555,"uuid":"29004132","full_name":"danielpclark/aes_keeper","owner":"danielpclark","description":"Encrypt data to database savable strings with AES 256 encryption.","archived":false,"fork":false,"pushed_at":"2017-04-15T21:41:36.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-29T16:13:13.372Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/danielpclark.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}},"created_at":"2015-01-09T06:33:50.000Z","updated_at":"2017-04-15T21:41:38.000Z","dependencies_parsed_at":"2022-07-07T22:52:56.663Z","dependency_job_id":null,"html_url":"https://github.com/danielpclark/aes_keeper","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/danielpclark/aes_keeper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielpclark%2Faes_keeper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielpclark%2Faes_keeper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielpclark%2Faes_keeper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielpclark%2Faes_keeper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danielpclark","download_url":"https://codeload.github.com/danielpclark/aes_keeper/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielpclark%2Faes_keeper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28100945,"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","status":"online","status_checked_at":"2025-12-28T02:00:05.685Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-10-12T15:26:21.419Z","updated_at":"2025-12-28T15:03:37.453Z","avatar_url":"https://github.com/danielpclark.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AesKeeper\n\nA database safe encryption using AES 256 CBC.  Key required, Salt optional.  Returns encrypted String and IV,\nor you can call **.to_s** to receive the encrypted data as one String. Decrypt will accept either form of the\n { encrypted: '', iv: '' } pair or the String result.\n\n**NOTE:**\n * Class object AesKeeper uses marshal which may be incompatible across platforms and Ruby versions. A benefit from this is the ability to place entire Ruby Objects in encrypted format.\n * Please use AESKeeper::AesKeeperPure for any compatibility reasons.  It needs String input.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'aes_keeper'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install aes_keeper\n\n## Implementation\n\n##### AESKeeper::AESKeeperMarshal \u0026\u0026 AesKeeper\n - Marshalling Object implementation\n\n##### AESKeeper::AESKeeperPure\n - Pure String implementation. Backwards compatible and crossplatform compatible.\n\nIf you are using the the AesKeeper from previous versions and would like to switch\nwithout changing throughout all of your code you can add an initializer in your software\nto change the AesKeeper from point at AESKeeper::AESKeeperMarshal to AESKeeper::AESKeeperPure\n\n```ruby\nrequire 'aes_keeper'\nObject.send(:remove_const, 'AesKeeper')\nAesKeeper = AESKeeper::AESKeeperPure\n```\n\n## Usage\n\nWith encryption and iv result separate:\n```ruby\ncipher = AesKeeper.new(key: 'some really good 32+ character long key for encryption! ^_^')\nresult = cipher.encrypt(\"apples\")\n# =\u003e {:encrypted=\u003e\"K1E/a75/3zxNKCTXJFJZaVe8jjeHFQG+Cv1Lxntz3oM=\\n\", :iv=\u003e\"uQozeVXYhaeK7Rvh1na6kA==\\n\"}\ncipher.decrypt(result)\n# =\u003e \"apples\" \n```\n\nWith encryption and iv result combined:\n```ruby\ncipher = AesKeeper.new(key: 'some really good 32+ character long key for encryption! ^_^')\nresult = cipher.encrypt(\"apples\").to_s\n# =\u003e \"xPbb+kVIROlA5YHvSaKsYcCobgBz/TQHpJ5wP9lAuBQ=\\n:WIaGiOhjFBRBVJReiA2aTA==\\n\"\ncipher.decrypt(result)\n# =\u003e \"apples\" \n```\n\nYou can specify a Salt as well:\n```ruby\nAesKeeper.new(\n  key: 'some really good 32+ character long key for encryption! ^_^',\n  salt: 'asdfqwerty'\n)\n```\n\nMore advanced usages are visible in the test suite.\n\n## Contributing\n\nThis code can be refactored and tested.  Otherwise I consider this project feature complete.  It's designed\nwith assumptions for its implementation and it's met those requirements.\n\n1. Fork it ( https://github.com/danielpclark/aes_keeper/fork )\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n\n## License\n\nCopyright (c) 2015-2016 Daniel P. Clark\n\nMIT License\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielpclark%2Faes_keeper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanielpclark%2Faes_keeper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielpclark%2Faes_keeper/lists"}