0.0
No commit activity in last 3 years
No release in over 3 years
The simplest gem for encrypt data
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies
 Project Readme

Just Encrypt

The simplest gem to encrypt and decrypt data, you only need to set a secret password to your credentials.

Getting started

JustEncrypt works with Rails 5.2 onwards. Add the following line to your Gemfile:

gem 'just-encrypt'

Then run bundle install

Next, you need to add a secret key into your credentials file, the key must be 32 bytes. You can generate one easily with OpenSSL:

$ openssl rand -hex 32

Then edit your credentials:

$ EDITOR=vim rails credentials:edit

And add the secret key generated with the next structure:

just_encrypt:
  secret: YOUR_SECRET_KEY

Encrypt data

require 'just-encrypt'

JustEncrypt.encrypt('STRING_TO_ENCRYPT')

Decrypt data

require 'just-encrypt'

JustEncrypt.decrypt('STRING_TO_DECRYPT')

Contributing

  1. Fork it
  2. Commit changes
  3. Submit a Pull Request
  4. ❤️