1 # hash a string as mysql's "PASSWORD()" function would do it
4 module Puppet::Parser::Functions
5 newfunction(:postgresql_password, :type => :rvalue, :doc => <<-EOS
6 Returns the postgresql password hash from the clear text username / password.
10 raise(Puppet::ParseError, "postgresql_password(): Wrong number of arguments " +
11 "given (#{args.size} for 2)") if args.size != 2
16 'md5' + Digest::MD5.hexdigest(password.to_s + username.to_s)