Skip to content

Instantly share code, notes, and snippets.

@sebasbad
Last active May 2, 2017
Embed
What would you like to do?
require 'digest'
File.foreach("emails.txt").with_index do |line|
strippedLine = "#{line}".strip
lineSha256 = Digest::SHA256.hexdigest strippedLine
puts "#{strippedLine},#{lineSha256}"
end
#usage: ruby rubySha256.rb > emailsSha256.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment