Puppet Function: wordpress::password_hash
- Defined in:
- lib/puppet/functions/wordpress/password_hash.rb
- Function type:
- Ruby 4.x API
Overview
Hash a string
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/puppet/functions/wordpress/password_hash.rb', line 5 Puppet::Functions.create_function(:'wordpress::password_hash') do # @param password # Plain text password. # # @return the password hash from the clear text password. # dispatch :password do required_param 'String', :password return_type 'String' end def password(password) return '' if password.empty? Digest::SHA1.hexdigest(Digest::SHA512.digest(password)) end end |