Applied fixes from StyleCI

This commit is contained in:
Daniil Gentili 2016-08-14 15:38:40 -04:00 committed by StyleCI Bot
parent a7acfb388c
commit 2bc5dc62b7
2 changed files with 6 additions and 5 deletions

View File

@ -16,12 +16,12 @@ class Crypt
{
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)
{
return Crypt::_ige($message, $key, $iv, 'decrypt');
return self::_ige($message, $key, $iv, 'decrypt');
}
/**
@ -73,5 +73,4 @@ class Crypt
return $ciphered;
}
}

View File

@ -1,5 +1,7 @@
<?php
namespace danog\MadelineProto;
// by https://github.com/mgp25
class TelegramEncryption
{
@ -7,7 +9,7 @@ class TelegramEncryption
public $iv;
public $debug;
public $rijndael;
public function __construct($key, $iv, $debug = false)
{
$this->key = $key;
@ -30,7 +32,7 @@ class TelegramEncryption
for ($i = 0; $i < strlen($message); $i += $blockSize) {
$x = substr($message, $i, $blockSize);
$this->debugLog('x: '.$this->_c($x)."\n");
$yXOR = $this->exor($x, $yPrev);