Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if ($lblok - ($i+2) >= 0) //warunek
- {
- $random = 'abcdefghijklmnop';
- $xor= [];
- for ($y = 1; $y <= aes::BLOCK_SIZE; $y++)
- {
- for ($z = 1; $z < $y; $z++)
- {
- $random[aes::BLOCK_SIZE - $z] = chr($y ^ $xor[$z-1]); // zmiana wartosci
- }
- for ($j = 0; $j < 256; $j++)
- {
- $random[aes::BLOCK_SIZE - $y] = chr($j); // wyciaganie bajtow
- if (aes::padding($random . $bloki[$lblok - ($i+1)]))
- {
- $pxor = ($y ^ $j); //padding XOR
- $xor[] = $pxor;
- $litera = (ord($bloki[$lblok - ($i+2)][aes::BLOCK_SIZE - $y]) ^ $pxor);
- $deszyfr = chr($litera) . $deszyfr;
- continue;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement