summaryrefslogtreecommitdiff
path: root/app/models/concerns/checksummable.rb
blob: 1f76eb87aa540aa7ea78263879cca69f28ca72bf (plain)
1
2
3
4
5
6
7
8
9
10
11
# frozen_string_literal: true

module Checksummable
  extend ActiveSupport::Concern

  class_methods do
    def hexdigest(path)
      Digest::SHA256.file(path).hexdigest
    end
  end
end