Applied fixes from StyleCI
This commit is contained in:
parent
a7acfb388c
commit
2bc5dc62b7
@ -16,12 +16,12 @@ class Crypt
|
|||||||
{
|
{
|
||||||
public static function ige_encrypt($message, $key, $iv)
|
public static function ige_encrypt($message, $key, $iv)
|
||||||
{
|
{
|
||||||
return Crypt::_ige($message, $key, $iv, 'encrypt');
|
return self::_ige($message, $key, $iv, 'encrypt');
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function ige_decrypt($message, $key, $iv)
|
public static function ige_decrypt($message, $key, $iv)
|
||||||
{
|
{
|
||||||
return Crypt::_ige($message, $key, $iv, 'decrypt');
|
return self::_ige($message, $key, $iv, 'decrypt');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -73,5 +73,4 @@ class Crypt
|
|||||||
|
|
||||||
return $ciphered;
|
return $ciphered;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace danog\MadelineProto;
|
namespace danog\MadelineProto;
|
||||||
|
|
||||||
// by https://github.com/mgp25
|
// by https://github.com/mgp25
|
||||||
class TelegramEncryption
|
class TelegramEncryption
|
||||||
{
|
{
|
||||||
@ -7,7 +9,7 @@ class TelegramEncryption
|
|||||||
public $iv;
|
public $iv;
|
||||||
public $debug;
|
public $debug;
|
||||||
public $rijndael;
|
public $rijndael;
|
||||||
|
|
||||||
public function __construct($key, $iv, $debug = false)
|
public function __construct($key, $iv, $debug = false)
|
||||||
{
|
{
|
||||||
$this->key = $key;
|
$this->key = $key;
|
||||||
@ -30,7 +32,7 @@ class TelegramEncryption
|
|||||||
|
|
||||||
for ($i = 0; $i < strlen($message); $i += $blockSize) {
|
for ($i = 0; $i < strlen($message); $i += $blockSize) {
|
||||||
$x = substr($message, $i, $blockSize);
|
$x = substr($message, $i, $blockSize);
|
||||||
|
|
||||||
$this->debugLog('x: '.$this->_c($x)."\n");
|
$this->debugLog('x: '.$this->_c($x)."\n");
|
||||||
|
|
||||||
$yXOR = $this->exor($x, $yPrev);
|
$yXOR = $this->exor($x, $yPrev);
|
||||||
|
Loading…
Reference in New Issue
Block a user