<commit_before>= yubikey

== Description

A library to decode, decrypt and parse Yubikey[http://www.yubico.com/home/index/] one-time passwords.

== Usage

=== OTP Decryption

  key = '<KEY>'
  otp = 'dteffujehknhfjbrjnlnldnhcujvddbikngjrtgh'
  token = Yubikey::OTP.new(otp, key)
  
  p "Device public id: #{token.public_id}" #=> 'dteffuje'
  p "Device secret id: #{token.secret_id}" #=> '<KEY>'
  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 <NAME> <<EMAIL>>
  Copyright (c) 2009 <NAME>
  The MIT License. See LICENSE.
<commit_msg>fix README typo<commit_after>= yubikey

== Description

A library to decode, decrypt and parse Yubikey[http://www.yubico.com/home/index/] one-time passwords.

== Usage

=== OTP Decryption

  key = '<KEY>'
  otp = 'dteffujehknhfjbrjnlnldnhcujvddbikngjrtgh'
  token = Yubikey::OTP.new(otp, key)
  
  p "Device public id: #{token.public_id}" #=> 'dteffuje'
  p "Device secret id: #{token.secret_id}" #=> '<KEY>'
  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 <NAME> <<EMAIL>>
  Copyright (c) 2009 <NAME>
  The MIT License. See LICENSE.

{'fraction_non_alphanumeric': 0.14032634032634034, 'fraction_numerical': 0.016783216783216783, 'mean_word_length': 3.866213151927438, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6758372', 'n_tokens_mistral': 871, 'n_tokens_neox': 818, 'n_words': 202}