Sha256: dc95294b84fdb2d4f08e0c5284a242e34a846d5dcbb690c7884c62fa19ce44c5
Contents?: true
Size: 403 Bytes
Versions: 157
Compression:
Stored size: 403 Bytes
Contents
require 'digest/md5' module Utils module MD5 class << self attr_accessor :buffer_size end self.buffer_size = 2 ** 20 - 1 module_function def md5(filename) digest = Digest::MD5.new digest.reset File.open(filename, 'rb') do |f| until f.eof? digest << f.read(MD5.buffer_size) end end digest.hexdigest end end end
Version data entries
157 entries across 157 versions & 1 rubygems