Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
ruby-otp is a One Time Password library, compatible with OPIE and S/KEY, and RFC 1760 compliant.
Ruby
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
test
.hgignore
.hgtags
History.txt
Manifest.txt
README.rdoc
Rakefile

README.rdoc

ruby-otp

by Guillaume Pierronnet

DESCRIPTION:

ruby-otp is a One Time Password library, compatible with OPIE and S/KEY, and RFC 1760 compliant.

FEATURES/PROBLEMS:

  • pure ruby

  • RFC 1760 compliant

  • OPIE and S/KEY compatible

SYNOPSIS:

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

TODO

  • RFC 2289 support

REQUIREMENTS:

  • openssl for OpenSSL::Digest::MD4

INSTALL:

  • sudo gem install ruby-otp

LICENSE:

GPL

Something went wrong with that request. Please try again.