{"id":23131210,"url":"https://github.com/emartech/ruby-easy-crypto","last_synced_at":"2025-07-07T14:08:16.409Z","repository":{"id":62557644,"uuid":"138162632","full_name":"emartech/ruby-easy-crypto","owner":"emartech","description":"Provides simple wrappers around the openssl crypto implementation.","archived":false,"fork":false,"pushed_at":"2022-06-08T12:01:39.000Z","size":45,"stargazers_count":2,"open_issues_count":6,"forks_count":1,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-07-01T08:42:43.441Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/emartech.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":"2018-06-21T11:40:33.000Z","updated_at":"2022-04-26T08:25:29.000Z","dependencies_parsed_at":"2022-11-03T06:30:37.469Z","dependency_job_id":null,"html_url":"https://github.com/emartech/ruby-easy-crypto","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/emartech/ruby-easy-crypto","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emartech%2Fruby-easy-crypto","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emartech%2Fruby-easy-crypto/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emartech%2Fruby-easy-crypto/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emartech%2Fruby-easy-crypto/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/emartech","download_url":"https://codeload.github.com/emartech/ruby-easy-crypto/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emartech%2Fruby-easy-crypto/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264089600,"owners_count":23555768,"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":[],"created_at":"2024-12-17T11:12:19.058Z","updated_at":"2025-07-07T14:08:16.391Z","avatar_url":"https://github.com/emartech.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# EasyCrypto [![Build Status](https://travis-ci.org/emartech/ruby-easy-crypto.svg?branch=master)](https://travis-ci.org/emartech/ruby-easy-crypto) [![Gem Version](https://badge.fury.io/rb/easy-crypto.svg)](https://badge.fury.io/rb/easy-crypto)\n\nProvides simple wrappers around the openssl crypto implementation. The library provides two interfaces: simple and advanced. Simple mode is designed for ease-of-use and advanced mode provides some performance benefits in certain use-cases. See below for more details.\n\nAll the underlying crypto operations are the same.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'easy-crypto'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install easy-crypto\n\n## Simple usage (Recommended)\n\n```ruby\nrequire 'easycrypto'\n\npassword = 'secret password'\nplaintext = 'some data'\n\necrypto = EasyCrypto::Crypto.new\n\nencrypted = ecrypto.encrypt(password, plaintext)\ndecrypted = ecrypto.decrypt(password, encrypted)\n\ndecrypted == plaintext\n```\n\n## Advanced usage (Use for performance)\n\n[Key derivation](https://en.wikipedia.org/wiki/Key_derivation_function) is a resource heavy process. The simple interface abstracts this away and forces you to recompute the key before each encryption/decryption process.\n\nThis interface allows you to cache the result of the key derivation. This is required if you need to encrypt/decrypt multiple times with the same derived key. Caching the key saves you the time to have to recompute it before every encryption/decryption.\n\n```ruby\nrequire 'easycrypto'\n\npassword = 'secret password'\nplaintext = 'data to encrypt ...'\n\necrypto = EasyCrypto::Crypto.new\n\nkey = EasyCrypto::Key.generate(key_password)\n\nencrypted = ecrypto.encrypt_with_key(key, plaintext)\ndecrypted = ecrypto.decrypt_with_key(key, encrypted)\n\ndecrypted == plaintext\n```\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femartech%2Fruby-easy-crypto","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femartech%2Fruby-easy-crypto","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femartech%2Fruby-easy-crypto/lists"}