ts3phpframework
Loading...
Searching...
No Matches
PlanetTeamSpeak\TeamSpeak3Framework\Helper\Crypt Class Reference

Helper class for data encryption. More...

Public Member Functions

 __construct (string $secret)
 encrypt (string $string)
 decrypt (string $string)

Protected Member Functions

 encipher (int &$xl, int &$xr)
 decipher (int &$xl, int &$xr)
 setSecretKey (string $passphrase)
 setDefaultKeys ()

Protected Attributes

StringHelper $passphrase = null
array $p = []
array $s = []

Detailed Description

Helper class for data encryption.

Definition at line 15 of file Crypt.php.

Constructor & Destructor Documentation

◆ __construct()

PlanetTeamSpeak\TeamSpeak3Framework\Helper\Crypt::__construct ( string $secret)

Crypt constructor.

Parameters
string$secret
Exceptions
HelperException

Definition at line 44 of file Crypt.php.

Member Function Documentation

◆ decipher()

PlanetTeamSpeak\TeamSpeak3Framework\Helper\Crypt::decipher ( int & $xl,
int & $xr )
protected

Deciphers a single 64-bit block

Parameters
integer$xl
integer$xr
Returns
void

Definition at line 119 of file Crypt.php.

◆ decrypt()

PlanetTeamSpeak\TeamSpeak3Framework\Helper\Crypt::decrypt ( string $string)

Decrypts a given string.

Parameters
string$string
Returns
string

Definition at line 78 of file Crypt.php.

◆ encipher()

PlanetTeamSpeak\TeamSpeak3Framework\Helper\Crypt::encipher ( int & $xl,
int & $xr )
protected

Enciphers a single 64-bit block.

Parameters
integer$xl
integer$xr

Definition at line 100 of file Crypt.php.

◆ encrypt()

PlanetTeamSpeak\TeamSpeak3Framework\Helper\Crypt::encrypt ( string $string)

Encrypts a given string.

Parameters
string$string
Returns
string

Definition at line 56 of file Crypt.php.

◆ setDefaultKeys()

PlanetTeamSpeak\TeamSpeak3Framework\Helper\Crypt::setDefaultKeys ( )
protected

Sets the default p and s keys.

Returns
void

Definition at line 180 of file Crypt.php.

◆ setSecretKey()

PlanetTeamSpeak\TeamSpeak3Framework\Helper\Crypt::setSecretKey ( string $passphrase)
protected

Sets the secret key using the specified pasphrase.

Parameters
string$passphrase
Returns
void
Exceptions
HelperException

Definition at line 138 of file Crypt.php.

Member Data Documentation

◆ $p

array PlanetTeamSpeak\TeamSpeak3Framework\Helper\Crypt::$p = []
protected

Definition at line 29 of file Crypt.php.

◆ $passphrase

StringHelper PlanetTeamSpeak\TeamSpeak3Framework\Helper\Crypt::$passphrase = null
protected

Definition at line 22 of file Crypt.php.

◆ $s

array PlanetTeamSpeak\TeamSpeak3Framework\Helper\Crypt::$s = []
protected

Definition at line 36 of file Crypt.php.


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