From: Brian Candler Date: 2011-03-16T04:38:31+09:00 Subject: Re: SHA1 Decryption!! Ben Bleything wrote in post #987607: > Everybody is saying the same thing. It's not possible to "decrypt" a > cryptographic hash. It *is* possible to bruteforce, but it may be very > time-consuming. Not very in this case. brian@zino:~$ cat dehash.rb require 'digest/sha1' TARGET = "c884efef7c92e8095d2dd06ce8e02826dcf05a3e" 1000.times do |i| 1000.times do |j| if Digest::SHA1.hexdigest("N59 52.%03d E017 42.%03d" % [i,j]) == TARGET raise "Whoo! #{i} #{j}" end end end brian@zino:~$ time ruby dehash.rb dehash.rb:6: Whoo! 65 988 (RuntimeError) from dehash.rb:4:in `times' from dehash.rb:4 from dehash.rb:3:in `times' from dehash.rb:3 real 0m0.839s user 0m0.820s sys 0m0.010s -- Posted via http://www.ruby-forum.com/.