sul-dlss/sdr-client

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

Summary

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

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