cryptic 1.0.0.beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +18 -0
- data/Gemfile +4 -0
- data/LICENSE +22 -0
- data/README.md +29 -0
- data/Thorfile +33 -0
- data/bin/cryptic +71 -0
- data/cryptic.gemspec +27 -0
- data/lib/cryptic.rb +12 -0
- data/lib/cryptic/encrypted_data.rb +115 -0
- data/lib/cryptic/exceptions.rb +17 -0
- data/lib/cryptic/exceptions/decryption_error.rb +10 -0
- data/lib/cryptic/exceptions/encryption_error.rb +8 -0
- data/lib/cryptic/exceptions/invalid_data.rb +8 -0
- data/lib/cryptic/exceptions/key_generation_failure.rb +8 -0
- data/lib/cryptic/exceptions/key_mismatch.rb +10 -0
- data/lib/cryptic/exceptions/key_not_found.rb +8 -0
- data/lib/cryptic/exceptions/unsupported_encoding.rb +8 -0
- data/lib/cryptic/keypair.rb +64 -0
- data/lib/cryptic/version.rb +4 -0
- metadata +151 -0
data/.gitignore
ADDED
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2013 Erran Carey
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
# Public Key Encryption/Decryption
|
2
|
+
|
3
|
+
TODO: Write a gem description
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
gem 'cryptic'
|
10
|
+
|
11
|
+
And then execute:
|
12
|
+
|
13
|
+
$ bundle
|
14
|
+
|
15
|
+
Or install it yourself as:
|
16
|
+
|
17
|
+
$ gem install cryptic
|
18
|
+
|
19
|
+
## Usage
|
20
|
+
|
21
|
+
TODO: Write usage instructions here
|
22
|
+
|
23
|
+
## Contributing
|
24
|
+
|
25
|
+
1. Fork it
|
26
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
27
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
28
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
29
|
+
5. Create new Pull Request
|
data/Thorfile
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
$:.unshift File.expand_path("../lib", __FILE__)
|
3
|
+
|
4
|
+
require 'bundler'
|
5
|
+
require 'bundler/setup'
|
6
|
+
require 'thor/rake_compat'
|
7
|
+
require 'yard'
|
8
|
+
|
9
|
+
class Default < Thor
|
10
|
+
include Thor::RakeCompat
|
11
|
+
require 'bundler/gem_tasks'
|
12
|
+
|
13
|
+
desc 'build', "Build cryptic-#{Cryptic::VERSION}.gem"
|
14
|
+
def build
|
15
|
+
Rake::Task['build'].execute
|
16
|
+
end
|
17
|
+
|
18
|
+
desc 'install', "Build and install cryptic-#{Cryptic::VERSION}.gem into system gems"
|
19
|
+
def install
|
20
|
+
Rake::Task['install'].execute
|
21
|
+
end
|
22
|
+
|
23
|
+
desc 'release', "Create tag v#{Cryptic::VERSION} and build and push cryptic-#{Cryptic::VERSION}.gem to Rubygems"
|
24
|
+
def release
|
25
|
+
Rake::Task['release'].execute
|
26
|
+
end
|
27
|
+
|
28
|
+
YARD::Rake::YardocTask.new
|
29
|
+
desc 'yard', 'Generate YARD Documentation'
|
30
|
+
def yard
|
31
|
+
Rake::Task['yard'].execute
|
32
|
+
end
|
33
|
+
end
|
data/bin/cryptic
ADDED
@@ -0,0 +1,71 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# -*- mode: ruby -*-
|
3
|
+
# vi: set ft=ruby :
|
4
|
+
|
5
|
+
require 'cryptic'
|
6
|
+
require 'cryptic/keypair'
|
7
|
+
require 'thor'
|
8
|
+
|
9
|
+
class CrypticCLI < Thor
|
10
|
+
desc 'decrypt [PRIVATE_KEY] [ENCRYPTED_FILE] [OPTIONS]', 'Decrypt a file with a private key'
|
11
|
+
method_option :passphrase, aliases: %w[-p], default: nil, desc: 'The passphrase to unlock the private key with'
|
12
|
+
method_option :encoding, aliases: %w[-e], default: :none, desc: 'The encoding to use, one of: [:none, :base64]'
|
13
|
+
method_option :path, aliases: %w[-o], default: "cryptic_#{rand(1000..9999)}.txt", desc: 'Where to place the encrypted file'
|
14
|
+
def decrypt(private_key, file)
|
15
|
+
# TODO: Update error handling
|
16
|
+
# * Better utilize custom exceptions
|
17
|
+
# * Catch file read errors
|
18
|
+
data = File.read(file)
|
19
|
+
encrypted = Cryptic::EncryptedData.load(data, options[:encoding])
|
20
|
+
decrypted_str = encrypted.decrypt(private_key, options[:passphrase])
|
21
|
+
|
22
|
+
if decrypted_str.eql?('')
|
23
|
+
$stderr.puts '[Error]: Unable to save the decrypted file'
|
24
|
+
exit 1
|
25
|
+
else
|
26
|
+
File.open(options[:path], 'w') do |file|
|
27
|
+
file.write decrypted_str
|
28
|
+
end
|
29
|
+
end
|
30
|
+
rescue Cryptic::InvalidData => e
|
31
|
+
$stderr.puts "[Error]: #{e.inspect}".red
|
32
|
+
exit 1
|
33
|
+
rescue Cryptic::KeyMismatch => e
|
34
|
+
$stderr.puts "[Error]: #{e.inspect}".red
|
35
|
+
exit 1
|
36
|
+
end
|
37
|
+
|
38
|
+
desc 'encrypt [PUBLIC_KEY] [TEXT_FILE] [OPTIONS]', 'Encrypt a file with a public key'
|
39
|
+
method_option :encoding, aliases: %w[-e], default: :none, desc: 'The encoding to use, one of: [:none, :base64]'
|
40
|
+
method_option :path, aliases: %w[-o], default: "cryptic_#{rand(1000..9999)}.ctxt", desc: 'Where to place the encrypted file'
|
41
|
+
def encrypt(public_key, file)
|
42
|
+
# TODO: Update error handling; See above TODO.
|
43
|
+
data = File.read(file)
|
44
|
+
encrypted = Cryptic::EncryptedData.new(data, public_key)
|
45
|
+
encrypted_str = encrypted.data
|
46
|
+
|
47
|
+
if encrypted_str.eql?('')
|
48
|
+
$stderr.puts '[Error]: Unable to save the encrypted file'
|
49
|
+
exit 1
|
50
|
+
else
|
51
|
+
File.open(options[:path], 'w') do |file|
|
52
|
+
file.write encrypted_str
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
desc 'generate [OPTIONS]', 'Generate a private/public keypair', aliases: %w[gen key-gen]
|
58
|
+
method_option :bits, aliases: %w[-b size], default: 2048, desc: 'The number of bits to use when generating your key'
|
59
|
+
method_option :passphrase, aliases: %w[-p], default: nil, desc: 'The passphrase to generate the private key with'
|
60
|
+
method_option :path, aliases: %w[-o], default: '.', desc: 'Where to place the generated keys'
|
61
|
+
def generate
|
62
|
+
keypair = Cryptic::Keypair.new(options[:passphrase], options[:bits])
|
63
|
+
keypair.save(options[:path])
|
64
|
+
$stdout.puts "Generated keys saved as '#{File.expand_path(options[:path])}/cryptic_public.pem' and '#{File.expand_path(options[:path])}/cryptic_private.pem'"
|
65
|
+
rescue Cryptic::KeyGenerationFailure => e
|
66
|
+
$stderr.puts "[Error]: #{e.message}".red
|
67
|
+
exit 1
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
CrypticCLI.start(ARGV)
|
data/cryptic.gemspec
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'cryptic/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = 'cryptic'
|
8
|
+
spec.version = Cryptic::VERSION
|
9
|
+
spec.authors = ['Erran Carey']
|
10
|
+
spec.email = ['me@errancarey.com']
|
11
|
+
spec.description = 'A gem to encrypt data using public keys.'
|
12
|
+
spec.summary = 'A quick way to encrypt data using public keys. Only people with the private key can decrypt said data.'
|
13
|
+
spec.homepage = 'https://github.com/ipwnstuff/cryptic'
|
14
|
+
spec.license = 'MIT'
|
15
|
+
|
16
|
+
spec.files = `git ls-files`.split($/)
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ['lib']
|
20
|
+
|
21
|
+
spec.add_dependency 'redcarpet'
|
22
|
+
spec.add_dependency 'thor'
|
23
|
+
spec.add_dependency 'yard'
|
24
|
+
|
25
|
+
spec.add_development_dependency 'bundler', '~> 1.3'
|
26
|
+
spec.add_development_dependency 'rake'
|
27
|
+
end
|
data/lib/cryptic.rb
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
require 'cryptic/encrypted_data'
|
2
|
+
require 'cryptic/exceptions'
|
3
|
+
require 'cryptic/version'
|
4
|
+
|
5
|
+
# A module to encrypt data using public keys
|
6
|
+
#
|
7
|
+
# @author Erran Carey <me@errancarey.com>
|
8
|
+
module Cryptic
|
9
|
+
# Including Cryptic::Exceptions allows you to use shorthand for exceptions:
|
10
|
+
# Cryptic::DecryptionError instead of Cryptic::Exceptions::DecryptionError
|
11
|
+
include Cryptic::Exceptions
|
12
|
+
end
|
@@ -0,0 +1,115 @@
|
|
1
|
+
require 'base64'
|
2
|
+
require 'openssl'
|
3
|
+
require 'cryptic/exceptions'
|
4
|
+
|
5
|
+
module Cryptic
|
6
|
+
# Allow the use of shorthand error handling
|
7
|
+
include Cryptic::Exceptions
|
8
|
+
|
9
|
+
# A class with methods to encrypt/decrypt data
|
10
|
+
#
|
11
|
+
# @!attribute [Symbol] encoding the encoding to use
|
12
|
+
# @!attribute [String] data the encrypted data string
|
13
|
+
# @author Erran Carey <me@errancarey.com>
|
14
|
+
class EncryptedData
|
15
|
+
attr_reader :data
|
16
|
+
attr_reader :encoding
|
17
|
+
|
18
|
+
# Initializes the encrypted data object
|
19
|
+
#
|
20
|
+
# @note If called without a public key's file name this doesn't
|
21
|
+
# automatically encrypt the data
|
22
|
+
# @param [String] data the data to encrypt
|
23
|
+
# @param [String] public_key_file the filename of the public key to use in
|
24
|
+
# the encryption process
|
25
|
+
# @param [Symbol] encoding the encoding to use
|
26
|
+
# @raise [KeyNotFound] if the specified public key wasn't found on the
|
27
|
+
# file system
|
28
|
+
# @return [EncryptedData] an encrypted data object
|
29
|
+
def initialize(data, public_key_file = nil, encoding = :none)
|
30
|
+
@encoding = encoding
|
31
|
+
|
32
|
+
if !public_key_file
|
33
|
+
# If no public key was provided the data should already be encrypted
|
34
|
+
@data = data
|
35
|
+
elsif File.exists? public_key_file.to_s
|
36
|
+
public_key = OpenSSL::PKey::RSA.new(File.read(public_key_file))
|
37
|
+
encrypted_data = public_key.public_encrypt(data)
|
38
|
+
@data = encode(encrypted_data)
|
39
|
+
else
|
40
|
+
raise KeyNotFound
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
# Creates a new encrypted data object from an encrypted data string
|
45
|
+
#
|
46
|
+
# @param [String] data the encrypted data to load
|
47
|
+
# @return [EncryptedData] an encrypted data object
|
48
|
+
def self.load(data, encoding = :none)
|
49
|
+
new(data, nil, encoding)
|
50
|
+
end
|
51
|
+
|
52
|
+
# Decrypts the data encrypted via a public key
|
53
|
+
#
|
54
|
+
# @note This doesn't have a partner encrypt method as the EncryptedData
|
55
|
+
# class encrypts data on initialization
|
56
|
+
# @note The passphrase can be left nil in the case that you're using a
|
57
|
+
# terminal that will allow you to enter the passphrase when prompted
|
58
|
+
# @param [String] private_key_file the private key to use during decryption
|
59
|
+
# @param [String] passphrase the passphrase to unlock the private key with
|
60
|
+
# @raise [KeyNotFound] if the specified public key wasn't found on the
|
61
|
+
# file system
|
62
|
+
def decrypt(private_key_file, passphrase = nil)
|
63
|
+
if File.exists? private_key_file.to_s
|
64
|
+
private_key = OpenSSL::PKey::RSA.new(File.read(private_key_file), passphrase)
|
65
|
+
decoded_string = decode(@data)
|
66
|
+
private_key.private_decrypt(decoded_string)
|
67
|
+
else
|
68
|
+
raise KeyNotFound
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
# @return [String] the encrypted data string
|
73
|
+
def to_s; @data; end
|
74
|
+
|
75
|
+
private
|
76
|
+
|
77
|
+
# TODO: The decode/encode methods shouldn't share so much code
|
78
|
+
# TODO: These methods also shouldn't raise an exception that could be raised
|
79
|
+
# earlier. Use something along the lines of:
|
80
|
+
# `SUPPORTED_ENCODING = [:base64, :none]` and checking whether the
|
81
|
+
# encoding supplied in initialize is included in it
|
82
|
+
|
83
|
+
# Decode a string using the specified encoding
|
84
|
+
#
|
85
|
+
# @param [String] data the data to encode
|
86
|
+
# @raise [UnsupportedEncoding] if the specified encoding isn't a valid
|
87
|
+
# @return [String] the encoded data
|
88
|
+
def decode(data)
|
89
|
+
case @encoding
|
90
|
+
when nil, :none, :raw
|
91
|
+
data
|
92
|
+
when :base64
|
93
|
+
Base64.decode64(data)
|
94
|
+
else
|
95
|
+
raise Cryptic::UnsupportedEncoding, @encoding
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
# Encode a string using the specified encoding
|
100
|
+
#
|
101
|
+
# @raise [UnsupportedEncoding] if the specified encoding isn't a valid
|
102
|
+
# encoding
|
103
|
+
# @return [String] the unencoded data
|
104
|
+
def encode(data)
|
105
|
+
case @encoding
|
106
|
+
when nil, :none, :raw
|
107
|
+
data
|
108
|
+
when :base64
|
109
|
+
Base64.encode64(data)
|
110
|
+
else
|
111
|
+
raise Cryptic::UnsupportedEncoding, @encoding
|
112
|
+
end
|
113
|
+
end
|
114
|
+
end
|
115
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'colorize'
|
2
|
+
require 'cryptic/exceptions/decryption_error'
|
3
|
+
require 'cryptic/exceptions/encryption_error'
|
4
|
+
require 'cryptic/exceptions/invalid_data'
|
5
|
+
require 'cryptic/exceptions/key_generation_failure'
|
6
|
+
require 'cryptic/exceptions/key_mismatch'
|
7
|
+
require 'cryptic/exceptions/key_not_found'
|
8
|
+
require 'cryptic/exceptions/unsupported_encoding'
|
9
|
+
|
10
|
+
module Cryptic
|
11
|
+
# A namepace for exceptions that's included in the Cryptic module for
|
12
|
+
# convenience
|
13
|
+
#
|
14
|
+
# @author Erran Carey <me@errancarey.com>
|
15
|
+
module Exceptions
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
require 'cryptic/exceptions/decryption_error'
|
2
|
+
|
3
|
+
module Cryptic
|
4
|
+
module Exceptions
|
5
|
+
# An exception to raise when you try to decrypt with the wrong private key
|
6
|
+
#
|
7
|
+
# @author Erran Carey <me@errancarey.com>
|
8
|
+
class KeyMismatch < DecryptionError; end
|
9
|
+
end
|
10
|
+
end
|
@@ -0,0 +1,64 @@
|
|
1
|
+
require 'cryptic/exceptions'
|
2
|
+
require 'fileutils'
|
3
|
+
require 'openssl'
|
4
|
+
|
5
|
+
module Cryptic
|
6
|
+
# Allow the use of shorthand error handling
|
7
|
+
include Cryptic::Exceptions
|
8
|
+
|
9
|
+
# A class that represents a private and public keypair
|
10
|
+
#
|
11
|
+
# @!attribute [String] private_key the contents of the private key file
|
12
|
+
# @!attribute [String] public_key the contents of the public key file
|
13
|
+
# @author Erran Carey <me@errancarey.com>
|
14
|
+
class Keypair
|
15
|
+
attr_reader :private_key
|
16
|
+
attr_reader :public_key
|
17
|
+
# Creates a keypair to be saved with #save
|
18
|
+
#
|
19
|
+
# @param [Fixnum] size the amount of bits to use in your key
|
20
|
+
# @return [Keypair] an object representing a private/public keypair
|
21
|
+
def initialize(passphrase = nil, size = 2048)
|
22
|
+
@saved = false
|
23
|
+
|
24
|
+
attempts ||= 0
|
25
|
+
attempts += 1
|
26
|
+
|
27
|
+
rsa_key = OpenSSL::PKey::RSA.new(size)
|
28
|
+
cipher = OpenSSL::Cipher::AES256.new(:CBC)
|
29
|
+
|
30
|
+
@private_key = rsa_key.to_pem(cipher, passphrase)
|
31
|
+
@public_key = rsa_key.public_key.to_pem
|
32
|
+
rescue OpenSSL::PKey::RSAError => e
|
33
|
+
if e.message =~ /^read key$/
|
34
|
+
retry unless attempts > 1
|
35
|
+
else
|
36
|
+
raise e
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
# Save the file
|
41
|
+
#
|
42
|
+
# @param [String] path the path to save the keypair into
|
43
|
+
# @todo Document what save may raise
|
44
|
+
# @return [String] returns the path files were saved to
|
45
|
+
def save(path = '.')
|
46
|
+
if @private_key.to_s.eql?('') || @public_key.to_s.eql?('')
|
47
|
+
raise Cryptic::KeyGenerationFailure, "The keypair was never successfully generated"
|
48
|
+
end
|
49
|
+
|
50
|
+
FileUtils.mkdir_p(File.dirname(path))
|
51
|
+
|
52
|
+
File.open("#{File.expand_path(path)}/cryptic_private.pem", 'w') do |file|
|
53
|
+
file.write @private_key
|
54
|
+
end
|
55
|
+
|
56
|
+
File.open("#{File.expand_path(path)}/cryptic_public.pem", 'w') do |file|
|
57
|
+
file.write @public_key
|
58
|
+
end
|
59
|
+
|
60
|
+
@saved = true
|
61
|
+
path
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
metadata
ADDED
@@ -0,0 +1,151 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: cryptic
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0.beta.1
|
5
|
+
prerelease: 6
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Erran Carey
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2013-07-06 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: redcarpet
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: thor
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
38
|
+
type: :runtime
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: yard
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ! '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
54
|
+
type: :runtime
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: bundler
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
66
|
+
requirements:
|
67
|
+
- - ~>
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '1.3'
|
70
|
+
type: :development
|
71
|
+
prerelease: false
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ~>
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '1.3'
|
78
|
+
- !ruby/object:Gem::Dependency
|
79
|
+
name: rake
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
82
|
+
requirements:
|
83
|
+
- - ! '>='
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: '0'
|
86
|
+
type: :development
|
87
|
+
prerelease: false
|
88
|
+
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
90
|
+
requirements:
|
91
|
+
- - ! '>='
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: '0'
|
94
|
+
description: A gem to encrypt data using public keys.
|
95
|
+
email:
|
96
|
+
- me@errancarey.com
|
97
|
+
executables:
|
98
|
+
- cryptic
|
99
|
+
extensions: []
|
100
|
+
extra_rdoc_files: []
|
101
|
+
files:
|
102
|
+
- .gitignore
|
103
|
+
- Gemfile
|
104
|
+
- LICENSE
|
105
|
+
- README.md
|
106
|
+
- Thorfile
|
107
|
+
- bin/cryptic
|
108
|
+
- cryptic.gemspec
|
109
|
+
- lib/cryptic.rb
|
110
|
+
- lib/cryptic/encrypted_data.rb
|
111
|
+
- lib/cryptic/exceptions.rb
|
112
|
+
- lib/cryptic/exceptions/decryption_error.rb
|
113
|
+
- lib/cryptic/exceptions/encryption_error.rb
|
114
|
+
- lib/cryptic/exceptions/invalid_data.rb
|
115
|
+
- lib/cryptic/exceptions/key_generation_failure.rb
|
116
|
+
- lib/cryptic/exceptions/key_mismatch.rb
|
117
|
+
- lib/cryptic/exceptions/key_not_found.rb
|
118
|
+
- lib/cryptic/exceptions/unsupported_encoding.rb
|
119
|
+
- lib/cryptic/keypair.rb
|
120
|
+
- lib/cryptic/version.rb
|
121
|
+
homepage: https://github.com/ipwnstuff/cryptic
|
122
|
+
licenses:
|
123
|
+
- MIT
|
124
|
+
post_install_message:
|
125
|
+
rdoc_options: []
|
126
|
+
require_paths:
|
127
|
+
- lib
|
128
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
129
|
+
none: false
|
130
|
+
requirements:
|
131
|
+
- - ! '>='
|
132
|
+
- !ruby/object:Gem::Version
|
133
|
+
version: '0'
|
134
|
+
segments:
|
135
|
+
- 0
|
136
|
+
hash: 1237837409677303508
|
137
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
138
|
+
none: false
|
139
|
+
requirements:
|
140
|
+
- - ! '>'
|
141
|
+
- !ruby/object:Gem::Version
|
142
|
+
version: 1.3.1
|
143
|
+
requirements: []
|
144
|
+
rubyforge_project:
|
145
|
+
rubygems_version: 1.8.25
|
146
|
+
signing_key:
|
147
|
+
specification_version: 3
|
148
|
+
summary: A quick way to encrypt data using public keys. Only people with the private
|
149
|
+
key can decrypt said data.
|
150
|
+
test_files: []
|
151
|
+
has_rdoc:
|