crypt_keeper_providers 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- data/gemfiles/activerecord_3_0.gemfile.lock +1 -1
- data/gemfiles/activerecord_3_1.gemfile.lock +1 -1
- data/gemfiles/activerecord_3_2.gemfile.lock +1 -1
- data/lib/crypt_keeper_providers/mysql_aes.rb +4 -4
- data/lib/crypt_keeper_providers/version.rb +1 -1
- data/spec/mysql_aes/log_subscriber_spec.rb +1 -1
- data/spec/postgres_pgp/log_subscriber_spec.rb +1 -1
- metadata +3 -3
@@ -18,16 +18,16 @@ module CryptKeeperProviders
|
|
18
18
|
#
|
19
19
|
# Returns an encrypted string
|
20
20
|
def encrypt(value)
|
21
|
-
|
22
|
-
|
21
|
+
Base64.encode64 escape_and_execute_sql(
|
22
|
+
["SELECT AES_ENCRYPT(?, ?)", value, key]).first
|
23
23
|
end
|
24
24
|
|
25
25
|
# Public: Decrypts a string
|
26
26
|
#
|
27
27
|
# Returns a plaintext string
|
28
28
|
def decrypt(value)
|
29
|
-
|
30
|
-
|
29
|
+
escape_and_execute_sql(
|
30
|
+
["SELECT AES_DECRYPT(?, ?)", Base64.decode64(value), key]).first
|
31
31
|
end
|
32
32
|
|
33
33
|
private
|
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.
|
4
|
+
version: 0.5.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -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: -3721720512107072383
|
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: -3721720512107072383
|
204
204
|
requirements: []
|
205
205
|
rubyforge_project:
|
206
206
|
rubygems_version: 1.8.23
|