Browse Source

Fix OpenSSL deprecation warning

OpenSSL::Cipher::Cipher has been deprecated in favor of OpenSSL::Cipher
master
newtrat 8 years ago
parent
commit
68f407c632
  1. 2
      lib/two_factor_authentication/models/two_factor_authenticatable.rb

2
lib/two_factor_authentication/models/two_factor_authenticatable.rb

@ -162,7 +162,7 @@ module Devise
iv = encrypted_otp_secret_key_iv iv = encrypted_otp_secret_key_iv
if iv.nil? if iv.nil?
algo = OpenSSL::Cipher::Cipher.new(algorithm) algo = OpenSSL::Cipher.new(algorithm)
iv = [algo.random_iv].pack('m') iv = [algo.random_iv].pack('m')
self.encrypted_otp_secret_key_iv = iv self.encrypted_otp_secret_key_iv = iv
end end

Loading…
Cancel
Save