Sha256: 2006b5230e0030404938c43c71fc65c57a9addada4a4e9fce5a47623e3304861

Contents?: true

Size: 276 Bytes

Versions: 11

Compression:

Stored size: 276 Bytes

Contents

require 'digest/sha2'

module Hanko
  class Digest
    class << self
      attr_writer :digest_class

      def file_digest(path)
        digest_class.file(path).hexdigest
      end

      def digest_class
        @digest_class || ::Digest::SHA256
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
hanko-0.2.3 lib/hanko/digest.rb
hanko-0.2.2 lib/hanko/digest.rb
hanko-0.2.1 lib/hanko/digest.rb
hanko-0.2.0 lib/hanko/digest.rb
hanko-0.1.6 lib/hanko/digest.rb
hanko-0.1.5 lib/hanko/digest.rb
hanko-0.1.4 lib/hanko/digest.rb
hanko-0.1.3 lib/hanko/digest.rb
hanko-0.1.2 lib/hanko/digest.rb
hanko-0.1.1 lib/hanko/digest.rb
hanko-0.1.0 lib/hanko/digest.rb