| category | OSS |
|---|---|
| package | OSS_Yubico |
| copyright | Copyright (c) 2007 - 2012, Open Source Solutions Limited, Dublin, Ireland |
| license | New BSD License |
aes128EcbDecrypt(string $cipherText, string $key) : string
stringthe encrypted string, a string of hexadecimal values
stringthe AES key, a string of hexadecimal values
stringa string of hexadecimal valuescrc16(string $string) : string
string
stringthe CRC16 value as a hexadecimal numbergetErrorMessage(int $errorCode) : string
intEror code is negative value from one to eight
stringhex2base64(string $hex) : string
string
stringhex2bin(string $hex) : string
string
stringhex2modhex(string $hex) : string
string
stringisCrcGood(string $string) : bool
string
boolmodhex2base64(string $modHex) : string
string
stringmodhex2hex($modHex) : string
stringvalidate(string $pOTP) : array | integer
Checks it against rules and the database, too. Returns with an associative array containing the following fields (extracted from the OTP): secret_id, session_counter, session_use, clock, random Retruns with a negative integer on error.
-1: No OTP provided -2: Corrupt OTP -3: DB failure while trying to read user data -4: User does not exist -5: Wrong AES key -6: User ID mismatch -7: Replay attack -8: DB failure while trying to update user data
string
arrayintegerarray on success, negative integer on error$VALIDATION_ERROR : array
ERR_CORRUPT_OTP
ERR_DATABASE_READ
ERR_DATABASE_WRITE
ERR_NO_OTP_PROVIDED
ERR_NO_SUCH_USER
ERR_REPLAY_ATTACK
ERR_USER_ID_MISMATCH
ERR_WRONG_AES_KEY