Module: Rickshaw::SHA256
- Defined in:
- lib/rickshaw.rb
Class Method Summary collapse
Class Method Details
.hash(file_path) ⇒ Object
37 38 39 40 41 42 43 44 45 46 |
# File 'lib/rickshaw.rb', line 37 def self.hash(file_path) hash = Digest::SHA256.new open(file_path, 'r') do |io| until io.eof? buffer = io.read(1024) hash.update(buffer) end end hash.hexdigest end |