File manager - Edit - /home/autoph/public_html/projects/aha-api/vendor/namshi/jose/tests/Namshi/JOSE/Test/Signer/OpenSSL/RS384Test.php
Back
<?php namespace Namshi\JOSE\Test\OpenSSL\Signer; use Namshi\JOSE\Signer\OpenSSL\RS384; use PHPUnit_Framework_TestCase as TestCase; class RS384Test extends TestCase { public function setup() { $this->privateKey = openssl_pkey_get_private(SSL_KEYS_PATH.'private.key', 'tests'); $this->public = openssl_pkey_get_public(SSL_KEYS_PATH.'public.key'); $this->signer = new RS384(); } public function testVerificationWorksProperly() { $encrypted = $this->signer->sign('aaa', $this->privateKey); $this->assertInternalType('bool', $this->signer->verify($this->public, $encrypted, 'aaa')); $this->assertTrue($this->signer->verify($this->public, $encrypted, 'aaa')); } public function testSigningWorksProperly() { $this->assertInternalType('string', $this->signer->sign('aaa', $this->privateKey)); } }
| ver. 1.4 |
.
| PHP 8.1.32 | Generation time: 0 |
proxy
|
phpinfo
|
Settings