Class Motp
Mobile One Time Password generator/validator, based on the http://motp.sourceforge.net specification.
Methods summary
public
|
#
__construct( string $pin = null, string $secret = null, integer $length = 6 )
Creates a new Motp object with the given seeded values |
public
|
#
seed( string $pin, string $secret, integer $length = 6 )
Seed the Motp object with the given values |
public
boolean
|
#
checkOtp( string $otp, integer $time )
Attempts to find a match for the given one time password with the given time value. |
public
string
|
#
opt( integer $time )
Generates a one time password based on the given time and the preset secret and pin. |
private
string
|
Magic methods summary
Properties summary
private
string
|
$pin |
#
PIN |
private
string
|
$secret |
#
Shared secret |
private
integer
|
$length |
#
Length of one time password |
private
integer
|
$moving_factor |
#
Moving factor of MOTP |
private
integer
|
$drift |
#
The number of seconds of drift to account for (+/- 3 minutes) |