crypt_keeper_providers 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
@@ -16,7 +16,7 @@ module CryptKeeperProviders
|
|
16
16
|
#
|
17
17
|
# options - A hash of options. :key is required
|
18
18
|
def initialize(options = {})
|
19
|
-
@aes = ::OpenSSL::Cipher
|
19
|
+
@aes = ::OpenSSL::Cipher.new("AES-256-CBC")
|
20
20
|
@aes.padding = 1
|
21
21
|
|
22
22
|
key = options.fetch(:key) do
|
@@ -33,7 +33,7 @@ module CryptKeeperProviders
|
|
33
33
|
return if value.nil?
|
34
34
|
aes.encrypt
|
35
35
|
aes.key = key
|
36
|
-
iv =
|
36
|
+
iv = aes.random_iv
|
37
37
|
aes.iv = iv
|
38
38
|
Base64::encode64("#{iv}#{SEPARATOR}#{aes.update(value.to_s) + aes.final}")
|
39
39
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: crypt_keeper_providers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-08-
|
12
|
+
date: 2012-08-31 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
@@ -191,7 +191,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
191
191
|
version: '0'
|
192
192
|
segments:
|
193
193
|
- 0
|
194
|
-
hash:
|
194
|
+
hash: 445658669485787231
|
195
195
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
196
196
|
none: false
|
197
197
|
requirements:
|
@@ -200,7 +200,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
200
200
|
version: '0'
|
201
201
|
segments:
|
202
202
|
- 0
|
203
|
-
hash:
|
203
|
+
hash: 445658669485787231
|
204
204
|
requirements: []
|
205
205
|
rubyforge_project:
|
206
206
|
rubygems_version: 1.8.23
|