lib/gtk2passwordapp/gtk2passwordapp.rb in gtk2passwordapp-4.3.0 vs lib/gtk2passwordapp/gtk2passwordapp.rb in gtk2passwordapp-4.4.0

- old
+ new

@@ -161,9 +161,12 @@ if pwd.include?("\n") pwd1 = BaseConvert::FromTo.new(:hex, :qgraph).convert Digest::SHA256.hexdigest pwd else pwd1 = pwd end + if salt = CONFIG[:Salt] + pwd1 = BaseConvert::FromTo.new(:hex, :qgraph).convert Digest::SHA256.hexdigest(pwd1+salt) + end end raise 'No password given.' if pwd1 == '' if entry2 raise 'Passwords did not match' unless entry2.text.strip==pwd1 @accounts.save pwd1