by Guillaume Pierronnet
ruby-otp is a One Time Password library, compatible with OPIE and S/KEY, and RFC 1760 compliant.
pure ruby
RFC 1760 compliant
OPIE and S/KEY compatible
seq_num = 497
seed = "aa3423"
otp = OTP.new(seq_num, seed, "my really private password", "md5")
expected_sentence = otp.to_s.downcase
puts "please enter the sentence from your OTP calculator seq_num: #{seq_num}, seed: #{seed}"
sentence = gets.chop
if expected_sentence == sentence.downcase
puts "access granted"
else
puts "you're not authorized"
end
RFC 2289 support
openssl for OpenSSL::Digest::MD4
sudo gem install ruby-otp
GPL