!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: Apache. PHP/7.3.33 

uname -a: Linux acloudg.aryanict.com 4.18.0-513.9.1.lve.el8.x86_64 #1 SMP Mon Dec 4 15:01:22 UTC
2023 x86_64
 

uid=1095(katebhospital) gid=1098(katebhospital) groups=1098(katebhospital) 

Safe-mode: OFF (not secure)

/opt/alt/php54/usr/share/pear/test/Security/Symfony/Component/Security/Core/Tests/Encoder/   drwxr-xr-x
Free 293.9 GB of 429.69 GB (68.4%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     BCryptPasswordEncoderTest.php (2.41 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Security\Core\Tests\Encoder;

use 
Symfony\Component\Security\Core\Encoder\BCryptPasswordEncoder;

/**
 * @author Elnur Abdurrakhimov <elnur@elnur.pro>
 */
class BCryptPasswordEncoderTest extends \PHPUnit_Framework_TestCase
{
    const 
PASSWORD 'password';
    const 
BYTES '0123456789abcdef';
    const 
VALID_COST '04';

    
/**
     * @expectedException \InvalidArgumentException
     */
    
public function testCostBelowRange()
    {
        new 
BCryptPasswordEncoder(3);
    }

    
/**
     * @expectedException \InvalidArgumentException
     */
    
public function testCostAboveRange()
    {
        new 
BCryptPasswordEncoder(32);
    }

    public function 
testCostInRange()
    {
        for (
$cost 4$cost <= 31$cost++) {
            new 
BCryptPasswordEncoder($cost);
        }
    }

    public function 
testResultLength()
    {
        
$this->skipIfPhpVersionIsNotSupported();

        
$encoder = new BCryptPasswordEncoder(self::VALID_COST);
        
$result $encoder->encodePassword(self::PASSWORDnull);
        
$this->assertEquals(60strlen($result));
    }

    public function 
testValidation()
    {
        
$this->skipIfPhpVersionIsNotSupported();

        
$encoder = new BCryptPasswordEncoder(self::VALID_COST);
        
$result $encoder->encodePassword(self::PASSWORDnull);
        
$this->assertTrue($encoder->isPasswordValid($resultself::PASSWORDnull));
        
$this->assertFalse($encoder->isPasswordValid($result'anotherPassword'null));
    }

    private function 
skipIfPhpVersionIsNotSupported()
    {
        if (
version_compare(phpversion(), '5.3.7''<')) {
            
$this->markTestSkipped('Requires PHP >= 5.3.7');
        }
    }

    
/**
     * @expectedException \Symfony\Component\Security\Core\Exception\BadCredentialsException
     */
    
public function testEncodePasswordLength()
    {
        
$encoder = new BCryptPasswordEncoder(self::VALID_COST);

        
$encoder->encodePassword(str_repeat('a'5000), 'salt');
    }

    public function 
testCheckPasswordLength()
    {
        
$encoder = new BCryptPasswordEncoder(self::VALID_COST);

        
$this->assertFalse($encoder->isPasswordValid('encoded'str_repeat('a'5000), 'salt'));
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

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

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by KaizenLouie | C99Shell Github | Generation time: 0.0035 ]--