encrypted_field 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 893b3d14ad9dd9026cb9db5a43772636c0f0a408
4
- data.tar.gz: 41f51c9792157cc0132c5f012672dbe6f75a3e04
3
+ metadata.gz: d68e0e192e3abf0c29358f757b62e73b7e1b74f1
4
+ data.tar.gz: 537df6bed9bc830c9f0a1ef11a2f5086c8eb12e6
5
5
  SHA512:
6
- metadata.gz: 908e6488ddf661e78c45e8a4002ceda346807b3f3e2120498e92967579d7904b4fac462e6da31cbf2d78142a426a60e726510ef1ba299c1629e8ac1d13232b71
7
- data.tar.gz: 317c0334fe2fd5d3f2b0ed6ade673a4faacd9fb32f2cf3882896cd8fc11a5c63a8bc9385473355ed9c9df5f7d765edcec1fb59ed3e128e2d676ca8e5692323de
6
+ metadata.gz: 60fb08193ea80927a487dbcda847f833289afa9b2c17177d5d5972265fb84c21e4653bc530728e3519658df2ce6103463e5579ed7e078f524850206de6522533
7
+ data.tar.gz: 9be09862feccc0f7adfe781bfab1be3cbfddcea7ad9d3829c2282e91b306dfbf7763d4fb5c56db464c74baa1de31e627686712ddfd9077f3e172d5ea4746856c
@@ -0,0 +1,6 @@
1
+ module EncryptedField
2
+ def self.decrypt_encrypted_field(value)
3
+ @private_key ||= OpenSSL::PKey::RSA.new(File.read("#{ENV['CONFIG_CERTIFICATE_PATH']}/encrypted_field_private_key.pem"))
4
+ @private_key.private_decrypt(Base64.decode64(value))
5
+ end
6
+ end
@@ -1,3 +1,3 @@
1
1
  module EncryptedField
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
@@ -1,5 +1,6 @@
1
1
  require "encrypted_field/version"
2
2
  require 'encrypted_field/controller_additions'
3
+ require 'encrypted_field/decrypt_password_field'
3
4
  require "encrypted_field/railtie" if defined?(Rails)
4
5
  require "openssl"
5
6
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: encrypted_field
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - akil
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-10-17 00:00:00.000000000 Z
11
+ date: 2017-10-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -72,6 +72,7 @@ files:
72
72
  - lib/encrypted_field.rb
73
73
  - lib/encrypted_field/action_view.rb
74
74
  - lib/encrypted_field/controller_additions.rb
75
+ - lib/encrypted_field/decrypt_password_field.rb
75
76
  - lib/encrypted_field/railtie.rb
76
77
  - lib/encrypted_field/version.rb
77
78
  - lib/tasks/generate_keypair.rake
@@ -97,7 +98,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
97
98
  version: '0'
98
99
  requirements: []
99
100
  rubyforge_project:
100
- rubygems_version: 2.4.6
101
+ rubygems_version: 2.6.14
101
102
  signing_key:
102
103
  specification_version: 4
103
104
  summary: client side encryption