+ def self.upgrade?(hash, _salt)
+ format = Argon2::HashFormat.new(hash)
+
+ format.variant != FORMAT.variant ||
+ format.version != FORMAT.version ||
+ format.t_cost != FORMAT.t_cost ||
+ format.m_cost != FORMAT.m_cost ||
+ format.p_cost != FORMAT.p_cost
+ rescue Argon2::ArgonHashFail
+ true
+ end