cryptic 1.0.0.beta.2 → 1.0.0.beta.3
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +6 -0
- data/LICENSE +1 -1
- data/README.md +6 -1
- data/lib/cryptic/encrypted_data.rb +2 -2
- data/lib/cryptic/version.rb +1 -1
- data/lib/cryptic.rb +1 -0
- data/spec/default_spec.rb +1 -0
- metadata +6 -3
data/.travis.yml
ADDED
data/LICENSE
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,9 @@
|
|
1
|
-
# Cryptic
|
1
|
+
# Cryptic [![Build Status](https://secure.travis-ci.org/ipwnstuff/cryptic.png)](http://travis-ci.org/ipwnstuff/cryptic) [![Dependency Status](https://gemnasium.com/ipwnstuff/cryptic.png)](https://gemnasium.com/ipwnstuff/cryptic)
|
2
2
|
A Ruby gem for public key encryption, private key decryption, and generating key pairs.
|
3
3
|
|
4
|
+
## Documentation
|
5
|
+
http://www.rubydoc.info/github/ipwnstuff/cryptic
|
6
|
+
|
4
7
|
## Installation
|
5
8
|
Just run: `gem install cryptic` or add `gem 'cryptic'` to your Gemfile.
|
6
9
|
|
@@ -19,6 +22,8 @@ Commands:
|
|
19
22
|
### Ruby
|
20
23
|
|
21
24
|
```ruby
|
25
|
+
require 'cryptic'
|
26
|
+
|
22
27
|
# Generate a keypair to use with a passphrase and the number of bits you'd like:
|
23
28
|
keypair = Cryptic::Keypair.new('P4$SpHr4z3', 2048)
|
24
29
|
keypair.save("#{ENV['HOME']}/.cryptic_keys")
|
@@ -37,7 +37,7 @@ module Cryptic
|
|
37
37
|
encrypted_data = public_key.public_encrypt(data)
|
38
38
|
@data = encode(encrypted_data)
|
39
39
|
else
|
40
|
-
raise KeyNotFound
|
40
|
+
raise Cryptic::KeyNotFound
|
41
41
|
end
|
42
42
|
end
|
43
43
|
|
@@ -65,7 +65,7 @@ module Cryptic
|
|
65
65
|
decoded_string = decode(@data)
|
66
66
|
private_key.private_decrypt(decoded_string)
|
67
67
|
else
|
68
|
-
raise KeyNotFound
|
68
|
+
raise Cryptic::KeyNotFound
|
69
69
|
end
|
70
70
|
end
|
71
71
|
|
data/lib/cryptic/version.rb
CHANGED
data/lib/cryptic.rb
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
# TODO: Implement tests
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cryptic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.beta.
|
4
|
+
version: 1.0.0.beta.3
|
5
5
|
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -116,6 +116,7 @@ extensions: []
|
|
116
116
|
extra_rdoc_files: []
|
117
117
|
files:
|
118
118
|
- .gitignore
|
119
|
+
- .travis.yml
|
119
120
|
- Gemfile
|
120
121
|
- LICENSE
|
121
122
|
- README.md
|
@@ -134,6 +135,7 @@ files:
|
|
134
135
|
- lib/cryptic/exceptions/unsupported_encoding.rb
|
135
136
|
- lib/cryptic/keypair.rb
|
136
137
|
- lib/cryptic/version.rb
|
138
|
+
- spec/default_spec.rb
|
137
139
|
homepage: https://github.com/ipwnstuff/cryptic
|
138
140
|
licenses:
|
139
141
|
- MIT
|
@@ -149,7 +151,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
149
151
|
version: '0'
|
150
152
|
segments:
|
151
153
|
- 0
|
152
|
-
hash:
|
154
|
+
hash: 1028222280275495127
|
153
155
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
154
156
|
none: false
|
155
157
|
requirements:
|
@@ -163,5 +165,6 @@ signing_key:
|
|
163
165
|
specification_version: 3
|
164
166
|
summary: A quick way to encrypt data using public keys. Only people with the private
|
165
167
|
key can decrypt said data.
|
166
|
-
test_files:
|
168
|
+
test_files:
|
169
|
+
- spec/default_spec.rb
|
167
170
|
has_rdoc:
|