Skip to content

Commit

Permalink
CS adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
terrafrost committed Jan 24, 2025
1 parent 604ef70 commit 42a0603
Show file tree
Hide file tree
Showing 11 changed files with 69 additions and 69 deletions.
14 changes: 7 additions & 7 deletions phpseclib/Crypt/Blowfish.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,23 +129,23 @@ class Blowfish extends BlockCipher
/**
* Block Length of the cipher
*
* @see \phpseclib3\Crypt\Common\SymmetricKey::block_size
* @see Common\SymmetricKey::block_size
* @var int
*/
protected $block_size = 8;

/**
* The mcrypt specific name of the cipher
*
* @see \phpseclib3\Crypt\Common\SymmetricKey::cipher_name_mcrypt
* @see Common\SymmetricKey::cipher_name_mcrypt
* @var string
*/
protected $cipher_name_mcrypt = 'blowfish';

/**
* Optimizing value while CFB-encrypting
*
* @see \phpseclib3\Crypt\Common\SymmetricKey::cfb_init_len
* @see Common\SymmetricKey::cfb_init_len
* @var int
*/
protected $cfb_init_len = 500;
Expand Down Expand Up @@ -325,7 +325,7 @@ class Blowfish extends BlockCipher
* derive this from $key_length or vice versa, but that'd mean we'd have to do multiple shift operations, so in lieu
* of that, we'll just precompute it once.}
*
* @see \phpseclib3\Crypt\Common\SymmetricKey::setKeyLength()
* @see Common\SymmetricKey::setKeyLength()
* @var int
*/
protected $key_length = 16;
Expand Down Expand Up @@ -368,7 +368,7 @@ public function setKeyLength($length)
*
* This is mainly just a wrapper to set things up for \phpseclib3\Crypt\Common\SymmetricKey::isValidEngine()
*
* @see \phpseclib3\Crypt\Common\SymmetricKey::isValidEngine()
* @see Common\SymmetricKey::isValidEngine()
* @param int $engine
* @return bool
*/
Expand All @@ -394,7 +394,7 @@ protected function isValidEngineHelper($engine)
/**
* Setup the key (expansion)
*
* @see \phpseclib3\Crypt\Common\SymmetricKey::_setupKey()
* @see Common\SymmetricKey::_setupKey()
*/
protected function setupKey()
{
Expand Down Expand Up @@ -755,7 +755,7 @@ protected function decryptBlock($in)
/**
* Setup the performance-optimized function for de/encrypt()
*
* @see \phpseclib3\Crypt\Common\SymmetricKey::_setupInlineCrypt()
* @see Common\SymmetricKey::_setupInlineCrypt()
*/
protected function setupInlineCrypt()
{
Expand Down
2 changes: 1 addition & 1 deletion phpseclib/Crypt/Common/StreamCipher.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ abstract class StreamCipher extends SymmetricKey
*
* Stream ciphers do not have a block size
*
* @see \phpseclib3\Crypt\Common\SymmetricKey::block_size
* @see SymmetricKey::block_size
* @var int
*/
protected $block_size = 0;
Expand Down
26 changes: 13 additions & 13 deletions phpseclib/Crypt/DES.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,31 +68,31 @@ class DES extends BlockCipher
/**
* Block Length of the cipher
*
* @see \phpseclib3\Crypt\Common\SymmetricKey::block_size
* @see Common\SymmetricKey::block_size
* @var int
*/
protected $block_size = 8;

/**
* Key Length (in bytes)
*
* @see \phpseclib3\Crypt\Common\SymmetricKey::setKeyLength()
* @see Common\SymmetricKey::setKeyLength()
* @var int
*/
protected $key_length = 8;

/**
* The mcrypt specific name of the cipher
*
* @see \phpseclib3\Crypt\Common\SymmetricKey::cipher_name_mcrypt
* @see Common\SymmetricKey::cipher_name_mcrypt
* @var string
*/
protected $cipher_name_mcrypt = 'des';

/**
* The OpenSSL names of the cipher / modes
*
* @see \phpseclib3\Crypt\Common\SymmetricKey::openssl_mode_names
* @see Common\SymmetricKey::openssl_mode_names
* @var array
*/
protected $openssl_mode_names = [
Expand All @@ -106,7 +106,7 @@ class DES extends BlockCipher
/**
* Optimizing value while CFB-encrypting
*
* @see \phpseclib3\Crypt\Common\SymmetricKey::cfb_init_len
* @see Common\SymmetricKey::cfb_init_len
* @var int
*/
protected $cfb_init_len = 500;
Expand Down Expand Up @@ -586,7 +586,7 @@ public function __construct($mode)
*
* This is mainly just a wrapper to set things up for \phpseclib3\Crypt\Common\SymmetricKey::isValidEngine()
*
* @see \phpseclib3\Crypt\Common\SymmetricKey::isValidEngine()
* @see Common\SymmetricKey::isValidEngine()
* @param int $engine
* @return bool
*/
Expand Down Expand Up @@ -615,7 +615,7 @@ protected function isValidEngineHelper($engine)
*
* DES also requires that every eighth bit be a parity bit, however, we'll ignore that.
*
* @see \phpseclib3\Crypt\Common\SymmetricKey::setKey()
* @see Common\SymmetricKey::setKey()
* @param string $key
*/
public function setKey($key)
Expand All @@ -631,8 +631,8 @@ public function setKey($key)
/**
* Encrypts a block
*
* @see \phpseclib3\Crypt\Common\SymmetricKey::encryptBlock()
* @see \phpseclib3\Crypt\Common\SymmetricKey::encrypt()
* @see Common\SymmetricKey::encryptBlock()
* @see Common\SymmetricKey::encrypt()
* @see self::encrypt()
* @param string $in
* @return string
Expand All @@ -645,8 +645,8 @@ protected function encryptBlock($in)
/**
* Decrypts a block
*
* @see \phpseclib3\Crypt\Common\SymmetricKey::decryptBlock()
* @see \phpseclib3\Crypt\Common\SymmetricKey::decrypt()
* @see Common\SymmetricKey::decryptBlock()
* @see Common\SymmetricKey::decrypt()
* @see self::decrypt()
* @param string $in
* @return string
Expand Down Expand Up @@ -747,7 +747,7 @@ private function processBlock($block, $mode)
/**
* Creates the key schedule
*
* @see \phpseclib3\Crypt\Common\SymmetricKey::setupKey()
* @see Common\SymmetricKey::setupKey()
*/
protected function setupKey()
{
Expand Down Expand Up @@ -1281,7 +1281,7 @@ protected function setupKey()
/**
* Setup the performance-optimized function for de/encrypt()
*
* @see \phpseclib3\Crypt\Common\SymmetricKey::setupInlineCrypt()
* @see Common\SymmetricKey::setupInlineCrypt()
*/
protected function setupInlineCrypt()
{
Expand Down
4 changes: 2 additions & 2 deletions phpseclib/Crypt/EC/BaseCurves/Montgomery.php
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ public function multiplyPoint(array $p, BigInteger $d)
*
* x=X/Z
*
* @return \phpseclib3\Math\PrimeField\Integer[]
* @return PrimeInteger[]
*/
public function convertToInternal(array $p)
{
Expand All @@ -266,7 +266,7 @@ public function convertToInternal(array $p)
/**
* Returns the affine point
*
* @return \phpseclib3\Math\PrimeField\Integer[]
* @return PrimeInteger[]
*/
public function convertToAffine(array $p)
{
Expand Down
4 changes: 2 additions & 2 deletions phpseclib/Crypt/EC/BaseCurves/Prime.php
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,7 @@ private static function getJSFPoints(Integer $k1, Integer $k2)
* To convert a Jacobian Coordinate to an Affine Point
* you do (x / z^2, y / z^3)
*
* @return \phpseclib3\Math\PrimeField\Integer[]
* @return PrimeInteger[]
*/
public function convertToAffine(array $p)
{
Expand All @@ -770,7 +770,7 @@ public function convertToAffine(array $p)
/**
* Converts an affine point to a jacobian coordinate
*
* @return \phpseclib3\Math\PrimeField\Integer[]
* @return PrimeInteger[]
*/
public function convertToInternal(array $p)
{
Expand Down
2 changes: 1 addition & 1 deletion phpseclib/Crypt/EC/BaseCurves/TwistedEdwards.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ public function getBasePoint()
/**
* Returns the affine point
*
* @return PrimeField\Integer[]
* @return PrimeInteger[]
*/
public function convertToAffine(array $p)
{
Expand Down
26 changes: 13 additions & 13 deletions phpseclib/Crypt/RC2.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@ class RC2 extends BlockCipher
/**
* Block Length of the cipher
*
* @see \phpseclib3\Crypt\Common\SymmetricKey::block_size
* @see Common\SymmetricKey::block_size
* @var int
*/
protected $block_size = 8;

/**
* The Key
*
* @see \phpseclib3\Crypt\Common\SymmetricKey::key
* @see Common\SymmetricKey::key
* @see self::setKey()
* @var string
*/
Expand All @@ -62,7 +62,7 @@ class RC2 extends BlockCipher
/**
* The Original (unpadded) Key
*
* @see \phpseclib3\Crypt\Common\SymmetricKey::key
* @see Common\SymmetricKey::key
* @see self::setKey()
* @see self::encrypt()
* @see self::decrypt()
Expand All @@ -81,15 +81,15 @@ class RC2 extends BlockCipher
/**
* The mcrypt specific name of the cipher
*
* @see \phpseclib3\Crypt\Common\SymmetricKey::cipher_name_mcrypt
* @see Common\SymmetricKey::cipher_name_mcrypt
* @var string
*/
protected $cipher_name_mcrypt = 'rc2';

/**
* Optimizing value while CFB-encrypting
*
* @see \phpseclib3\Crypt\Common\SymmetricKey::cfb_init_len
* @see Common\SymmetricKey::cfb_init_len
* @var int
*/
protected $cfb_init_len = 500;
Expand Down Expand Up @@ -261,7 +261,7 @@ public function __construct($mode)
*
* This is mainly just a wrapper to set things up for \phpseclib3\Crypt\Common\SymmetricKey::isValidEngine()
*
* @see \phpseclib3\Crypt\Common\SymmetricKey::__construct()
* @see Common\SymmetricKey::__construct()
* @param int $engine
* @return bool
*/
Expand Down Expand Up @@ -323,7 +323,7 @@ public function getKeyLength()
* has more then 128 bytes in it, and set $key to a single null byte if
* it is empty.
*
* @see \phpseclib3\Crypt\Common\SymmetricKey::setKey()
* @see Common\SymmetricKey::setKey()
* @param string $key
* @param int|boolean $t1 optional Effective key length in bits.
* @throws \LengthException if the key length isn't supported
Expand Down Expand Up @@ -426,8 +426,8 @@ public function decrypt($ciphertext)
/**
* Encrypts a block
*
* @see \phpseclib3\Crypt\Common\SymmetricKey::encryptBlock()
* @see \phpseclib3\Crypt\Common\SymmetricKey::encrypt()
* @see Common\SymmetricKey::encryptBlock()
* @see Common\SymmetricKey::encrypt()
* @param string $in
* @return string
*/
Expand Down Expand Up @@ -470,8 +470,8 @@ protected function encryptBlock($in)
/**
* Decrypts a block
*
* @see \phpseclib3\Crypt\Common\SymmetricKey::decryptBlock()
* @see \phpseclib3\Crypt\Common\SymmetricKey::decrypt()
* @see Common\SymmetricKey::decryptBlock()
* @see Common\SymmetricKey::decrypt()
* @param string $in
* @return string
*/
Expand Down Expand Up @@ -514,7 +514,7 @@ protected function decryptBlock($in)
/**
* Creates the key schedule
*
* @see \phpseclib3\Crypt\Common\SymmetricKey::setupKey()
* @see Common\SymmetricKey::setupKey()
*/
protected function setupKey()
{
Expand All @@ -534,7 +534,7 @@ protected function setupKey()
/**
* Setup the performance-optimized function for de/encrypt()
*
* @see \phpseclib3\Crypt\Common\SymmetricKey::setupInlineCrypt()
* @see Common\SymmetricKey::setupInlineCrypt()
*/
protected function setupInlineCrypt()
{
Expand Down
10 changes: 5 additions & 5 deletions phpseclib/Crypt/RC4.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class RC4 extends StreamCipher
/**
* The mcrypt specific name of the cipher
*
* @see \phpseclib3\Crypt\Common\SymmetricKey::cipher_name_mcrypt
* @see Common\SymmetricKey::cipher_name_mcrypt
* @var string
*/
protected $cipher_name_mcrypt = 'arcfour';
Expand All @@ -98,7 +98,7 @@ class RC4 extends StreamCipher
*
* This is mainly just a wrapper to set things up for \phpseclib3\Crypt\Common\SymmetricKey::isValidEngine()
*
* @see \phpseclib3\Crypt\Common\SymmetricKey::__construct()
* @see Common\SymmetricKey::__construct()
* @param int $engine
* @return bool
*/
Expand Down Expand Up @@ -159,7 +159,7 @@ public function setKey($key)
/**
* Encrypts a message.
*
* @see \phpseclib3\Crypt\Common\SymmetricKey::decrypt()
* @see Common\SymmetricKey::decrypt()
* @see self::crypt()
* @param string $plaintext
* @return string $ciphertext
Expand All @@ -178,7 +178,7 @@ public function encrypt($plaintext)
* $this->decrypt($this->encrypt($plaintext)) == $this->encrypt($this->encrypt($plaintext)).
* At least if the continuous buffer is disabled.
*
* @see \phpseclib3\Crypt\Common\SymmetricKey::encrypt()
* @see Common\SymmetricKey::encrypt()
* @see self::crypt()
* @param string $ciphertext
* @return string $plaintext
Expand Down Expand Up @@ -214,7 +214,7 @@ protected function decryptBlock($in)
/**
* Setup the key (expansion)
*
* @see \phpseclib3\Crypt\Common\SymmetricKey::_setupKey()
* @see Common\SymmetricKey::_setupKey()
*/
protected function setupKey()
{
Expand Down
4 changes: 2 additions & 2 deletions phpseclib/Crypt/Rijndael.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ class Rijndael extends BlockCipher
* or not for the current $block_size/$key_length.
* In case of, $cipher_name_mcrypt will be set dynamically at run time accordingly.
*
* @see \phpseclib3\Crypt\Common\SymmetricKey::cipher_name_mcrypt
* @see \phpseclib3\Crypt\Common\SymmetricKey::engine
* @see Common\SymmetricKey::cipher_name_mcrypt
* @see Common\SymmetricKey::engine
* @see self::isValidEngine()
* @var string
*/
Expand Down
Loading

0 comments on commit 42a0603

Please sign in to comment.