diff options
Diffstat (limited to 'lib/puppet/util')
-rw-r--r-- | lib/puppet/util/checksums.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/puppet/util/checksums.rb b/lib/puppet/util/checksums.rb index a09523740..41f878687 100644 --- a/lib/puppet/util/checksums.rb +++ b/lib/puppet/util/checksums.rb @@ -7,6 +7,15 @@ module Puppet::Util::Checksums end # Strip the checksum type from an existing checksum + def sumdata(checksum) + if checksum =~ /^\{(\w+)\}(.+)/ + return $2 + else + return nil + end + end + + # Strip the checksum type from an existing checksum def sumtype(checksum) if checksum =~ /^\{(\w+)\}/ return $1 |