Skip to content

Instantly share code, notes, and snippets.

@sebasbad
Last active May 2, 2017 10:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sebasbad/fc93cba34e40dba0179f2e27c30e9af1 to your computer and use it in GitHub Desktop.
Save sebasbad/fc93cba34e40dba0179f2e27c30e9af1 to your computer and use it in GitHub Desktop.
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