class Bundler::Checksum

def from_gem_package(gem_package, algo = DEFAULT_ALGORITHM)

def from_gem_package(gem_package, algo = DEFAULT_ALGORITHM)
  return if Bundler.settings[:disable_checksum_validation]
  return unless source = gem_package.instance_variable_get(:@gem)
  return unless source.respond_to?(:with_read_io)
  source.with_read_io do |io|
    from_gem(io, source.path)
  ensure
    io.rewind
  end
end