encryption 1.1.4 → 1.1.5

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.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- M2FiOTRlYTljMTJhM2I2OTZjOWU2YTc0ZDk3ODU5OGU1OTIzOWRlZQ==
4
+ ZDVlZmQ5YWMzY2MwYjQ1NjI1YTViMTcxOGRhMGI0Y2YxYzkxZDQ1OA==
5
5
  data.tar.gz: !binary |-
6
- ZmZjNTdkZDlhNDBiMDE0ZDI0NzZhYWE3OGY1OTI0MTAwNzJkNzBiZQ==
6
+ ZTc2Y2E2OGI2ZDc0Yjc1NzNkOWZiYzEzMTVlNDJlOGY2ZmZkYjE1OQ==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- ZDA5MTM4MjZmYmE3YTFiOGZiZTk4MDZjNWRkMWI1NjZkMTJkNGU1N2MzYTY0
10
- YzYxNGYyM2QxNTA2Y2YxMDE1N2Q3YjlmOTE4MDYyNmQxMDYwOWE3OGQ3NGY5
11
- ZmJkM2NhZWVhNzc0ZGM2YTA5NTA2MzU4NzQyYmJkNzg5YTIzYTk=
9
+ OTkxOWU0MTUxYjkwMmY1YWUyZjE5NTI0NmJhNjgxMTVlZTQxNWY1Mzg2ODYx
10
+ YTE3ZmVkNTk5YjZmOWJlMWVmNzk5MTRhN2MzYWM1MTQwN2ZmMzkzYzgzN2Vj
11
+ M2JhYWM0OTZmYzA1MjU5OGY4MDAzZGM1MmMyNjMwYThhMTFiZTk=
12
12
  data.tar.gz: !binary |-
13
- YzBjYTBmMGFiYzE2MWE0MjYyMTQzMTc4YTFjMGNiZmFjYmVhZWI2YWY0NGJm
14
- YzU1MTYxNTBmNjY3ZTg2NjNlZGZlNWEzM2Q5ZTI3MDJmNTUwZDIzMmRlODJh
15
- N2IyZGQzYmYzNzc3ODE4NjEyYWY4OTk5NmM3Mjc4MGIwYmNmYTI=
13
+ ODRhOGZmNDc0YjRhNjA4MTQyOWE5ZDMyZTYwOWM2YjcyZWM2ODUwNWYwOWU3
14
+ NmRmNjEzOTQxMzg5MmU0MTZjMTNhNzcwZjUxNTBiMTBlYmQyMzI2N2UxODUy
15
+ YTcyODZkODI2YjQ0ODJjOWUwMTJhNGFkNDM2MTIyY2EyYTk1NWQ=
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- encryption (1.1.3)
4
+ encryption (1.1.4)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -1,10 +1,11 @@
1
1
  Encryption
2
2
  ==========
3
-
3
+ [![Gem Version](https://badge.fury.io/rb/encryption.png)](http://badge.fury.io/rb/encryption)
4
4
  [![Code Climate](https://codeclimate.com/github/Itehnological/encryption.png)](https://codeclimate.com/github/Itehnological/encryption)
5
5
  [![Build Status](https://travis-ci.org/Itehnological/encryption.png)](https://travis-ci.org/Itehnological/encryption)
6
6
 
7
- A simple wrapper for the OpenSSL Cipher library
7
+ A simple wrapper for the OpenSSL Cipher library for Ruby and Rails applications.
8
+ This gem provides you with an easy way to encrypt and decrypt any data using both symmetrical and asymmetrical algorithms.
8
9
 
9
10
  Installation
10
11
  ------------
@@ -25,7 +26,7 @@ Symmetric encryption
25
26
  A simple example of how the gem works:
26
27
  ```ruby
27
28
  Encryption.key = "Secretly yours,\n very long encryption key"
28
- data = "this is to remain secret"
29
+ data = "this is to stay secret"
29
30
  encrypted_str = Encryption.encrypt(data)
30
31
  Encryption.decrypt(encrypted_str) == data # true
31
32
  ```
@@ -36,7 +37,7 @@ Encryption.decrypt(encrypted_str) == data # true
36
37
  ```ruby
37
38
  encryptor = Encryption::Symmetric.new
38
39
  encryptor.key = "Secretly yours,\n very long encryption key"
39
- data = "this is to remain secret"
40
+ data = "this is to stay secret"
40
41
  encrypted_str = encryptor.encrypt(data)
41
42
  encryptor.decrypt(encrypted_str) == data # true
42
43
  ```
@@ -45,22 +46,23 @@ encryptor.decrypt(encrypted_str) == data # true
45
46
  -------------
46
47
  For symmetric encryption / decryption you need to set an encryption key. The rest of the settings are optional. Here is a list of all of them:
47
48
  `Encryption.key` - Your encryption key
48
- `Encryption.iv # Optional` - Encryption initialization vector. Defaults to the charecter `"\0"` _(Optional)_
49
- `Encryption.cipher # Optional` - Your encryption algorithm. Defaults to `aes-256-cbc` _(Optional)_
49
+ `Encryption.iv # Optional` - Encryption initialization vector. Defaults to the character `"\0"` _(Optional)_
50
+ `Encryption.cipher # Optional` - Your encryption algorithm. Defaults to `aes-256-cbc` _(Optional)_
51
+
50
52
  Run `openssl list-cipher-commands` in the terminal to list all installed ciphers or call `OpenSSL::Cipher.ciphers` in _Ruby_, which will return an array, containing all available algorithms.
51
53
 
52
54
  You can optionally configure both a global instance and a custom instance with a _block_:
53
55
  ```ruby
54
56
  Encryption.config do |config|
55
- config.key = "don't look at me!"
56
- config.iv = "is there a better way to initialize OpenSSL?"
57
- config.cipher = "camellia-128-ecb" # if you feel adventurous
57
+ config.key = "don't look at me!"
58
+ config.iv = "is there a better way to initialize OpenSSL?"
59
+ config.cipher = "camellia-128-ecb" # if you feel adventurous
58
60
  end
59
61
  ```
60
62
 
61
63
  Asymmetric encryption (public/private key encryption)
62
64
  -----------------------------------------------------
63
- The `encryption` gem also provides easier synax for asymmetric encryption.
65
+ The `encryption` gem also provides easier syntax for asymmetric encryption.
64
66
 
65
67
  Generating keypair
66
68
  ------------------
@@ -128,7 +130,7 @@ License
128
130
  -------
129
131
  This gem is distributed under The MIT License.
130
132
 
131
- Author
132
- ------
133
- Itay Grudev
134
-   ![Itay Grudev](http://safemail.justlikeed.net/e/a5307c0c2dd405f756cab9f4c76cd63a.png)
133
+ Author
134
+ ------
135
+ Itay Grudev
136
+   ![Itay Grudev](http://safemail.justlikeed.net/e/a5307c0c2dd405f756cab9f4c76cd63a.png)
@@ -2,7 +2,7 @@ require 'date'
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'encryption'
5
- s.version = '1.1.4'
5
+ s.version = '1.1.5'
6
6
  s.date = Date.today.to_s
7
7
  s.summary = 'A simple wrapper for the OpenSSL Cipher library'
8
8
  s.description = 'Encryption provides a simple interface for symmetric / asymmetric encryption with the OpenSSL Cipher library'
@@ -18,7 +18,7 @@ module Encryption
18
18
  super
19
19
  end
20
20
 
21
- def self.respond_to?(name)
21
+ def self.respond_to?(name, include_all = false)
22
22
  initalize_own_instance
23
23
 
24
24
  return true if @@instance.respond_to?(name)
@@ -14,7 +14,7 @@ module Encryption
14
14
  super
15
15
  end
16
16
 
17
- def respond_to?(name)
17
+ def respond_to?(name, include_all = false)
18
18
  return true if @configuration.respond_to? name
19
19
  super
20
20
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: encryption
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.4
4
+ version: 1.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Itay Grudev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-04-04 00:00:00.000000000 Z
11
+ date: 2013-04-07 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Encryption provides a simple interface for symmetric / asymmetric encryption
14
14
  with the OpenSSL Cipher library