No commit activity in last 3 years
No release in over 3 years
A simple encryption tool based on common convention
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Runtime

>= 0
>= 0
>= 0
 Project Readme

inline_encryption Build StatusCode Climate

Simple encryption relying on convention and designed to be used inline as string replacements.

PLEASE upgrade to version 2.0 - previous versions lend themselves to making human errors which could lead to exploitation.

Upgrading from 1.0 to 2.0

  1. Recommended, but optional - generate a new RSA key pair
  2. For a properly configured production environment, simply configure with a private key
  3. Pass along the public key to any developers on the team that will need to encrypt new values

Usage

Imagine you have a file named database.yml that contains passwords.

Before:

password: '123456'

After:

password: <%= InlineEncryption.decrypt(encrypted stuff goes here) %>

To set up:

InlineEncryption.config[:key] = '/some/rsa_key'

An example of different keys per environment:

InlineEncryption.config[:key] = ENV['INLINE_ENCRYPTION_KEY']

If you've configured with a private key, you can both encrypt and decrypt. If you've configured with a public key, you can only encrypt.