diff options
author | mh <mh@immerda.ch> | 2009-10-31 15:16:48 +0100 |
---|---|---|
committer | mh <mh@immerda.ch> | 2009-10-31 15:16:48 +0100 |
commit | b2ed518d24580fa94442f598c9c967d47da8db92 (patch) | |
tree | 6ff6cd283e0c8e6eb71976cdfcb43c155d368161 /lib/puppet/parser | |
parent | c2c5f587d39754d755f7ec1b072866a360259226 (diff) |
move plugin directory to fit new 0.25 style
Diffstat (limited to 'lib/puppet/parser')
-rw-r--r-- | lib/puppet/parser/functions/htpasswd_sha1.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/puppet/parser/functions/htpasswd_sha1.rb b/lib/puppet/parser/functions/htpasswd_sha1.rb new file mode 100644 index 0000000..937621d --- /dev/null +++ b/lib/puppet/parser/functions/htpasswd_sha1.rb @@ -0,0 +1,8 @@ +require 'digest/sha1' +require 'base64' + +module Puppet::Parser::Functions + newfunction(:htpasswd_sha1, :type => :rvalue) do |args| + "{SHA}" + Base64.encode64(Digest::SHA1.digest(args[0])) + end +end |