sul-dlss/sdr-client

View on GitHub
lib/sdr_client/deposit/file_metadata_builder_operations/md5.rb

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
# frozen_string_literal: true

module SdrClient
  module Deposit
    module FileMetadataBuilderOperations
      # MD5 for this file.
      class MD5
        NAME = 'md5'
        def self.for(filepath:, **)
          Digest::MD5.file(filepath).hexdigest
        end
      end
    end
  end
end