Module: Chef::Mixin::Checksum

Instance Method Summary collapse

Instance Method Details

#checksum(file) ⇒ Object


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

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

#short_cksum(checksum) ⇒ Object


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

def short_cksum(checksum)
  return "none" if checksum.nil?

  checksum.slice(0, 6)
end