Skip to content

Instantly share code, notes, and snippets.

@bradland
Created July 1, 2011 14:08
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 bradland/1058611 to your computer and use it in GitHub Desktop.
Save bradland/1058611 to your computer and use it in GitHub Desktop.
Simple timing test for SHA512
#!/usr/bin/env ruby
require 'digest/sha2'
def time
start = Time.now
yield
puts "That took #{Time.now - start} seconds"
end
time do
1000.times do
my_password = Digest::SHA512.hexdigest("testpass")
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment