Method: Racadm.password_changed?
- Defined in:
- lib/puppet_x/racadm/racadm.rb
.password_changed?(new_password, sha256, salt) ⇒ Boolean
50 51 52 53 54 55 |
# File 'lib/puppet_x/racadm/racadm.rb', line 50 def self.password_changed?(new_password, sha256, salt) new_password_sha = Digest::SHA256.hexdigest( new_password + salt.gsub(%r{..}) { |pair| pair.hex.chr }, ).upcase !new_password_sha.eql? sha256 end |