Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

YubiRuby

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

YubiRuby

  • 1.1.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

YubiRuby

Yubico Server wrapper in Ruby

Installation

$ gem install YubiRuby

Some examples

Checking an OTP

require 'rubygems'
require 'YubiRuby'

key = "6df89690b5f51bd9ac912c5004781e86" #use your AES key
y = YubiRuby::Yubikey.new(key);
puts y.key
otp = gets().strip
puts y.parse(otp)
puts "Ouput: #{y}"
puts "uid: #{y.uid}"
puts "session counter: #{y.session_counter}"
puts "capslock: #{y.triggered_by_capslock?}"
puts "timestamp low/high: #{y.timestamp_low}/#{y.timestamp_high}"
puts "session use: #{y.session_use}"
puts "random: #{y.random}"
puts "crc: #{y.crc}"
puts "crc residue: #{y.crc_residue}"
puts "crc residue ok?: #{y.crc?} (#{y.crc_residue} == #{YubiRuby::Yubikey::CRC_OK_RESIDUE})"

Generating a valid yubikey

key = YubiRuby::FakeYubikey.new
key.set_random_key
key.set_random_uid
key.public_id = "vvefeeccebek"
puts "Yubikey generated"
puts "public id:\t#{key.public_id}"
puts "key:\t\t#{key.key}"
puts "uid:\t\t#{key.uid}"
puts "And now 3 otp"
3.times { puts key.otp }

FAQs

Package last updated on 18 Jul 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc