Puppet Function: htpasswd::ht_sha1
- Defined in:
- lib/puppet/functions/htpasswd/ht_sha1.rb
- Function type:
- Ruby 4.x API
Overview
4 5 6 7 8 9 10 11 12 |
# File 'lib/puppet/functions/htpasswd/ht_sha1.rb', line 4 Puppet::Functions.create_function(:'htpasswd::ht_sha1') do dispatch :ht_sha1 do param 'String', :value end def ht_sha1(value) "{SHA}"+Base64.encode64(Digest::SHA1.digest(value)).chomp! end end |