X-Git-Url: https://git.adam-barratt.org.uk/?p=mirror%2Fdsa-puppet.git;a=blobdiff_plain;f=3rdparty%2Fmodules%2Fstdlib%2Flib%2Fpuppet%2Fparser%2Ffunctions%2Fpw_hash.rb;h=ee008dd3e6ac3ec14ff3aa8214cb69f04762be5c;hp=eaf1d7478756ed934c02902ad8cb2e46a1ea7509;hb=30caaa85aed7015ca0d77216bff175eebd917eb7;hpb=6f656bd4265e3dab13b9af2bf96e9044322e9d8f diff --git a/3rdparty/modules/stdlib/lib/puppet/parser/functions/pw_hash.rb b/3rdparty/modules/stdlib/lib/puppet/parser/functions/pw_hash.rb index eaf1d7478..ee008dd3e 100644 --- a/3rdparty/modules/stdlib/lib/puppet/parser/functions/pw_hash.rb +++ b/3rdparty/modules/stdlib/lib/puppet/parser/functions/pw_hash.rb @@ -1,10 +1,14 @@ -# Please note: This function is an implementation of a Ruby class and as such may not be entirely UTF8 compatible. To ensure compatibility please use this function with Ruby 2.4.0 or greater - https://bugs.ruby-lang.org/issues/10085. +# Please note: This function is an implementation of a Ruby class and as such may not be entirely UTF8 compatible. +# To ensure compatibility please use this function with Ruby 2.4.0 or greater - https://bugs.ruby-lang.org/issues/10085. +# Puppet::Parser::Functions.newfunction( :pw_hash, :type => :rvalue, :arity => 3, - :doc => "Hashes a password using the crypt function. Provides a hash - usable on most POSIX systems. + :doc => <<-DOC + @summary + Hashes a password using the crypt function. Provides a hash usable + on most POSIX systems. The first argument to this function is the password to hash. If it is undef or an empty string, this function returns undef. @@ -21,9 +25,13 @@ Puppet::Parser::Functions.newfunction( The third argument to this function is the salt to use. - Note: this uses the Puppet Master's implementation of crypt(3). If your - environment contains several different operating systems, ensure that they - are compatible before using this function.", + @return [Hash] + Provides a hash usable on most POSIX systems. + + > *Note:*: this uses the Puppet Master's implementation of crypt(3). If your + environment contains several different operating systems, ensure that they + are compatible before using this function. + DOC ) do |args| raise ArgumentError, "pw_hash(): wrong number of arguments (#{args.size} for 3)" if args.size != 3 args.map! do |arg|