diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/puppet/util/checksums.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/puppet/util/checksums.rb b/lib/puppet/util/checksums.rb index 39477ee2b..f68f77624 100644 --- a/lib/puppet/util/checksums.rb +++ b/lib/puppet/util/checksums.rb @@ -1,6 +1,11 @@ # A stand-alone module for calculating checksums # in a generic way. module Puppet::Util::Checksums + # Is the provided string a checksum? + def checksum?(string) + string =~ /^\{(\w{3,5})\}\S+/ + end + # Strip the checksum type from an existing checksum def sumtype(checksum) if checksum =~ /^\{(\w+)\}/ |