Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Translate yubikey one-time passwords to modhex regardless of keyboard layout.

Project Description

The Yubikey is a one-time password device that acts as a USB keyboard, emitting a unique sequence of keycodes each time the button is pressed. These codes produce different characters depending on your keyboard layout. This can be frustrating if your keyboard layout is incompatible with the Yubico server.

modhex.translate(otp) compares the unicode output of a Yubikey against the characters the Yubikey would emit in a variety of keyboard layouts, returning the set of possible translations. In the likely case len(set(otp)) == 16, almost every keyboard layout has an unambigous translation into Yubico-compatible modhex, what the Yubikey types under the QWERTY keyboard layout.

>>> import modhex
>>> modhex.translate(u"jjjjjjjjnhe.ngcgjeiuujjjdtgihjuecyixinxunkhj")
set([u'ccccccccljdeluiucdgffccchkugjcfditgbglbflvjc'])
>>> modhex.translate(u"jjjjjjjjnhe.ngcgjeiuujjjdtgihjuecyixinxunkhj",
... modhex.HEX)
set([u'00000000a823ae7e0254400069e580427d515a14af80'])
Release History

Release History

This version
History Node

0.1

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
Modhex-0.1.tar.gz (5.3 kB) Copy SHA256 Checksum SHA256 Source Dec 12, 2009

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting