Upgraded Ruby to 2.4.2, fixed OpenSSL warnings, and 3 gems
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user