Md5sum.rb
This content was produced by an LLM and could include errors.
This script demonstrates MD5 hashing using Ruby’s digest library. It calculates and outputs the hexadecimal hashes for a sample string and a specified local file.
require 'digest/md5'
#=> true
Digest::MD5.hexdigest("ruby")
#=> "58e53d1324eef6265fdb97b08ed9aadf"
Digest::MD5.file('input/digest/md5sum.rb').to_s
#=> "b9e992f67fcc4e238d9964a07aba6dd7"
Ruby 4.0.3