Module: Chef::Mixin::Checksum

Instance Method Summary collapse

Instance Method Details

#checksum(file) ⇒ Object


26
27
28
# File 'lib/chef/mixin/checksum.rb', line 26

def checksum(file)
  Chef::Digester.checksum_for_file(file)
end

#short_cksum(checksum) ⇒ Object


30
31
32
33
# File 'lib/chef/mixin/checksum.rb', line 30

def short_cksum(checksum)
  return "none" if checksum.nil?
  checksum.slice(0, 6)
end