I've written a rubygem that decodes, decrypts, and parses Yubikey OTPs.
Install it by running
sudo gem install yubikey
The source is available at http://github.com/titanous/yubikey
The gem wraps the C library for ModHex decoding, AES decryption, and CRC verification.
Let me know if you have questions.
I went to https://upgrade.yubico.com/getapikey/
and generated a secret key. This key looks like AES because it ends with an = sign.
I tried this key when calling Yubikey::OTP.new(otp, key) and I get the following error.
Yubikey::OTP::InvalidKeyError: Key must be 32 hex characters
I then went to http://demo.yubico.com/php-yubico/Modhex_Calculator.php
and tried a bunch of different combinations but the results are the same.