Project

cryptic

0.0
Repository is archived
No commit activity in last 3 years
No release in over 3 years
A gem to encrypt data using public keys.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

~> 1.3
>= 0
>= 0

Runtime

 Project Readme

No longer maintained

⚠️ I've stopped development on this project. If you want to take this name in rubygems.org please email me at me@errancarey.com to request transfer of ownership.

Cryptic Build Status Dependency Status

A Ruby gem for public key encryption, private key decryption, and generating key pairs.

Languages

For documentation in other languages look around in locales/files to find a README marked with your laungage code. If you can speak multiple languages then feel free add a new one!

Documentation

http://www.rubydoc.info/github/ipwnstuff/cryptic

Installation

Just run: gem install cryptic or add gem 'cryptic' to your Gemfile.

Usage

Command line

[ecarey @ cryptic]$ cryptic
Commands:
  cryptic decrypt [PRIVATE_KEY] [ENCRYPTED_FILE] [OPTIONS]  # Decrypt a file with a private key
  cryptic encrypt [PUBLIC_KEY] [TEXT_FILE] [OPTIONS]        # Encrypt a file with a public key
  cryptic generate [OPTIONS]                                # Generate a private/public keypair
  cryptic help [COMMAND]                                    # Describe available commands or one specific command

Ruby

require 'cryptic'

# Load a keypair to use:
keypair = Cryptic::Keypair.new('cryptic_private.pem', public_key: 'cryptic_public.pem')

# Obtain your public/private keys from the `Cryptic::Keypair` object:
private_key = keypair.private_key
public_key = keypair.public_key

# Encrypt a file:
data = File.read('foo.txt')
encrypted = Cryptic::EncryptedData.new(data, public_key, :base64)

# Returns an encrypted string you can save off to a file:
encrypted.data

# To return the data call decrypt on the encrypted data object w/ the private key and passphrase:
decrypted = encrypted.decrypt(private_key, 'P4$SpHr4z3', :base64)

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b feature/my-awesome-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin feature/my-awesome-feature)
  5. Create new Pull Request