encrypt_column 0.1.0 → 0.1.1

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,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 181ee10189a3bafd2eff6e34027ed0e9d306188e
4
- data.tar.gz: af2b55e36335468a8fcb822c6eab00b0d50b8fd1
3
+ metadata.gz: 6526d7cdcee7b1990853ae5eac6e332b50b1c4a1
4
+ data.tar.gz: a7bbbfcaf6587c768d2f9f29cdeb4ab68939f885
5
5
  SHA512:
6
- metadata.gz: d7c4639ddc4fdd40cc6e8b6aa6d7a91a71854aef372ba108e5ff4a32d5c85ed54cf8f567338d28193e0336c9fb79e3d70e9c152f9c46467de9ae68b9c02b061d
7
- data.tar.gz: d95a83fae55a881a65645b8a40674f28a989ea4cc7488fe5b81d670a85c961298e55e637335760d92ff2777edb7705d3656016557e993c363dcbb4851083e835
6
+ metadata.gz: ac1cb1754f319e1b9fcf5ee5f411280f3e0a135729f263094a1717ba2bfb13cc1ab5613b7243510d7190fddfc3d8506b83ed298fbb79aa7fe7c7c35188355088
7
+ data.tar.gz: df8415142ff9134cc9a0daa062508ec7a7b6d51bfa33a113a31c849b4960573d2cd9974f5740a8e20023451a195668270117ec5f414146c7b564cd0033857cb1
data/.gitignore CHANGED
@@ -7,3 +7,4 @@
7
7
  /pkg/
8
8
  /spec/reports/
9
9
  /tmp/
10
+ *.gem
@@ -1,7 +1,7 @@
1
1
  class Decrypt
2
2
  def self.cipher(ciphertext)
3
- raise 'Encryption Key Config Missing' unless ENV['encryption_key'].present?
4
- ActiveSupport::MessageEncryptor.new(ENV['encryption_key']).decrypt_and_verify(ciphertext)
3
+ raise 'Encryption Key Config Missing' unless ENV['ENCRYPTION_KEY'].present?
4
+ ActiveSupport::MessageEncryptor.new(ENV['ENCRYPTION_KEY']).decrypt_and_verify(ciphertext)
5
5
  rescue ActiveSupport::MessageVerifier::InvalidSignature
6
6
  return ciphertext
7
7
  end
@@ -1,6 +1,6 @@
1
1
  class Encrypt
2
2
  def self.text(plaintext)
3
- return raise 'Missing Encryption Key Config' if ENV['encryption_key'].nil?
4
- ActiveSupport::MessageEncryptor.new(ENV['encryption_key']).encrypt_and_sign(plaintext)
3
+ return raise 'Missing Encryption Key Config' if ENV['ENCRYPTION_KEY'].nil?
4
+ ActiveSupport::MessageEncryptor.new(ENV['ENCRYPTION_KEY']).encrypt_and_sign(plaintext)
5
5
  end
6
6
  end
@@ -3,7 +3,7 @@ require 'digest'
3
3
  class Hashed
4
4
  def self.val(plaintext)
5
5
  return nil if plaintext.nil?
6
- return raise 'Missing Hash Salt Config' if ENV['hash_salt'].nil?
7
- Digest::SHA2.hexdigest(ENV['hash_salt'] + plaintext.to_s)
6
+ return raise 'Missing Hash Salt Config' if ENV['HASH_SALT'].nil?
7
+ Digest::SHA2.hexdigest(ENV['HASH_SALT'] + plaintext.to_s)
8
8
  end
9
9
  end
@@ -1,3 +1,3 @@
1
1
  module EncryptColumn
2
- VERSION = '0.1.0'.freeze
2
+ VERSION = '0.1.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: encrypt_column
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan Herman