Upgraded Ruby to 2.4.2, fixed OpenSSL warnings, and 3 gems

This commit is contained in:
Al Snow
2017-09-25 12:58:06 -04:00
parent c242fb27e3
commit 20635993c8
9 changed files with 414 additions and 19 deletions
+4 -4
View File
@@ -9,18 +9,18 @@ class WorkInfo < ApplicationRecord
end
def encrypt_ssn
aes = OpenSSL::Cipher::Cipher.new(cipher_type)
aes = OpenSSL::Cipher.new(cipher_type)
aes.encrypt
aes.key = key
aes.key = key[0..31]
aes.iv = iv if iv != nil
self.encrypted_ssn = aes.update(self.SSN) + aes.final
self.SSN = nil
end
def decrypt_ssn
aes = OpenSSL::Cipher::Cipher.new(cipher_type)
aes = OpenSSL::Cipher.new(cipher_type)
aes.decrypt
aes.key = key
aes.key = key[0..31]
aes.iv = iv if iv != nil
aes.update(self.encrypted_ssn) + aes.final
end