Server IP : 66.29.132.124 / Your IP : 18.227.209.89 Web Server : LiteSpeed System : Linux business141.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64 User : wavevlvu ( 1524) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/wavevlvu/book24.ng/vendor/lcobucci/jwt/test/functional/ |
Upload File : |
<?php namespace Lcobucci\JWT; use Lcobucci\JWT\Signer\Keychain; /** * @author Luís Otávio Cobucci Oblonczyk <lcobucci@gmail.com> */ trait Keys { /** * @var array */ protected static $rsaKeys; /** * @var array */ protected static $ecdsaKeys; /** * @beforeClass */ public static function createRsaKeys() { $keychain = new Keychain(); $dir = 'file://' . __DIR__; static::$rsaKeys = [ 'private' => $keychain->getPrivateKey($dir . '/rsa/private.key'), 'public' => $keychain->getPublicKey($dir . '/rsa/public.key'), 'encrypted-private' => $keychain->getPrivateKey($dir . '/rsa/encrypted-private.key', 'testing'), 'encrypted-public' => $keychain->getPublicKey($dir . '/rsa/encrypted-public.key') ]; } /** * @beforeClass */ public static function createEcdsaKeys() { $keychain = new Keychain(); $dir = 'file://' . __DIR__; static::$ecdsaKeys = [ 'private' => $keychain->getPrivateKey($dir . '/ecdsa/private.key'), 'private-params' => $keychain->getPrivateKey($dir . '/ecdsa/private2.key'), 'public1' => $keychain->getPublicKey($dir . '/ecdsa/public1.key'), 'public2' => $keychain->getPublicKey($dir . '/ecdsa/public2.key'), 'public-params' => $keychain->getPublicKey($dir . '/ecdsa/public3.key'), ]; } }