public class Pof extends Object
Utility methods of use when decryption and parsing of YubiKey One Time Passwords (OTPs).
Modifier | Constructor and Description |
---|---|
private |
Pof() |
public static Token parse(String block, byte[] key) throws GeneralSecurityException
Decrypt and parse YubiKey OTP.
block
- Modhex
encoded representation of the YubiKey OTP.key
- 128 bit AES key used to encrypt block
, now will be
used to ecrypt.GeneralSecurityException
- If decryption fails.public static byte[] decrypt(byte[] key, byte[] decoded) throws GeneralSecurityException
Does AES encryption of a YubiKey OTP byte sequence.
key
- AES key.decoded
- YubiKey OTP byte sequence,
Modhex.decode(String)
is the typical producer of
this.GeneralSecurityException
- If decryption fails.Copyright © 2013 Yubico AB. All Rights Reserved.