puppetlabs/puppet — pull request #2624 by jaredjennings (2014-05-07 22:02:29+00:00)
Title: (PUP-2511) Add parser function digest: uses digest_algorithm to hash, not strictly md5

Puppet has an md5 parser function, which returns the MD5 digest of its
argument. On hosts configured for compliance with U.S. Federal
Information Processing Standard (FIPS) 140-2, attempts to use the MD5
algorithm cause errors, because MD5 is no longer FIPS Approved. This
patch adds a parser function called digest, which returns the digest
of its argument using the algorithm named by the digest_algorithm
setting in puppet.conf. Therefore, where md5 may fail on some hosts,
the digest function should always return a value; but the value may
vary if the digest_algorithm setting is changed.

The comment regarding the arity of the function has been addressed, hopefully satisfactorily.

This pull request supersedes GH-2603.