require 'digest' puts "Testing the file: sample.txt" file = File.open("sample.txt", "r") fileday = file.readline filerolls= file.readline omlette = file.readline puts "Supplied Rolls:" puts omlette hashbrown = file.readline puts "Supplied Hash:" puts hashbrown puts "Calculated Hash:" wtf = Digest::SHA256.hexdigest(omlette).chomp puts wtf if wtf.equal? hashbrown puts "MATCH" else puts "NO MATCH" end