class Bundler::CompactIndexClient::Updater

def parse_digests(response)

Ignores unsupported algorithms.
https://www.rfc-editor.org/rfc/rfc8941#name-parsing-a-byte-sequence
according to RFC 8941 Structured Field Values for HTTP.
Unwraps and returns a Hash of digest algorithms and base64 values
def parse_digests(response)
  return unless header = response["Repr-Digest"] || response["Digest"]
  digests = {}
  header.split(",") do |param|
    algorithm, value = param.split("=", 2)
    algorithm.strip!
    algorithm.downcase!
    next unless SUPPORTED_DIGESTS.key?(algorithm)
    next unless value = byte_sequence(value)
    digests[algorithm] = value
  end
  digests.empty? ? nil : digests
end