MediaWiki REL1_32
HOTPResult Class Reference

The HOTPResult Class converts an HOTP item to various forms Supported formats include hex, decimal, string, and HOTP. More...

Public Member Functions

 __construct ( $value)
 Build an HOTP Result.
 
 toDec ()
 Returns the decimal version of the HOTP.
 
 toHex ()
 Returns the hex version of the HOTP.
 
 toHOTP ( $length)
 Returns the truncated decimal form of the HOTP.
 
 toString ()
 Returns the string version of the HOTP.
 

Protected Attributes

 $binary
 
 $decimal
 
 $hash
 
 $hex
 

Detailed Description

The HOTPResult Class converts an HOTP item to various forms Supported formats include hex, decimal, string, and HOTP.

Author
Jakob Heuser (firstname)@felocity.com

Definition at line 108 of file hotp.php.

Constructor & Destructor Documentation

◆ __construct()

HOTPResult::__construct ( $value)

Build an HOTP Result.

Parameters
string$valuethe value to construct with

Definition at line 118 of file hotp.php.

References $hex, $value, and array().

Member Function Documentation

◆ toDec()

HOTPResult::toDec ( )

Returns the decimal version of the HOTP.

Returns
int

Definition at line 163 of file hotp.php.

References $decimal.

Referenced by toHOTP().

◆ toHex()

HOTPResult::toHex ( )

Returns the hex version of the HOTP.

Returns
string

Definition at line 155 of file hotp.php.

References $hex.

◆ toHOTP()

HOTPResult::toHOTP ( $length)

Returns the truncated decimal form of the HOTP.

Parameters
int$lengththe length of the HOTP to return
Returns
string

Definition at line 172 of file hotp.php.

References toDec().

◆ toString()

HOTPResult::toString ( )

Returns the string version of the HOTP.

Returns
string

Definition at line 147 of file hotp.php.

References $hash.

Member Data Documentation

◆ $binary

HOTPResult::$binary
protected

Definition at line 110 of file hotp.php.

◆ $decimal

HOTPResult::$decimal
protected

Definition at line 111 of file hotp.php.

Referenced by toDec().

◆ $hash

HOTPResult::$hash
protected

Definition at line 109 of file hotp.php.

Referenced by toString().

◆ $hex

HOTPResult::$hex
protected

Definition at line 112 of file hotp.php.

Referenced by __construct(), and toHex().


The documentation for this class was generated from the following file: