Sha256: 94c14c3c6dea2557279829749a800febc0ef8240e08647ea2d27c426ed693a14
Contents?: true
Size: 1.25 KB
Versions: 1
Compression:
Stored size: 1.25 KB
Contents
= yubikey == Description A library to decode, decrypt and parse Yubikey[http://www.yubico.com/home/index/] one-time passwords. == Usage === OTP Decryption key = 'ecde18dbe76fbd0c33330f1c354871db' otp = 'dteffujehknhfjbrjnlnldnhcujvddbikngjrtgh' token = Yubikey::OTP.new(otp, key) p "Device public id: #{token.public_id}" #=> 'dteffuje' p "Device secret id: #{token.secret_id}" #=> '8792ebfe26cc' p "Device insertions: #{token.insert_counter}" #=> 19 p "Session activation counter: #{token.session_counter}" #=> 17 p "Session timestamp: #{token.timestamp}" #=> 49712 p "OTP random data: #{token.random_number}" #=> 40904 == OTP Verification begin otp = Yubikey::OTP::Verify.new('dteffujehknhfjbrjnlnldnhcujvddbikngjrtgh') if otp.valid? p 'valid OTP' elsif otp.replayed? p 'replayed OTP' end rescue Yubikey::OTP::InvalidOTPError p 'invalid OTP' end == Install sudo gem install yubikey == Copyright === Ruby library Written by Jonathan Rudenberg <jon335@gmail.com> Copyright (c) 2009 Jonathan Rudenberg The MIT License. See LICENSE. === Contributors Erik Ruwalder === AES, ModHex, and CRC code Written by Simon Josefsson <simon@josefsson.org> Copyright (c) 2006, 2007, 2008, 2009 Yubico AB
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
yubikey-1.1.0 | README.rdoc |