File Manager Lite
Dir:
/home/durantab/esebok.com/vendor/firebase/php-jwt/src
Upload
[..]
BeforeValidException.php (357 B)
Edit
Rename
Del
CachedKeySet.php (7.12 KB)
Edit
Rename
Del
ExpiredException.php (353 B)
Edit
Rename
Del
JWK.php (11.78 KB)
Edit
Rename
Del
JWT.php (23.66 KB)
Edit
Rename
Del
JWTExceptionWithPayloadInterface.php (396 B)
Edit
Rename
Del
Key.php (1.29 KB)
Edit
Rename
Del
SignatureInvalidException.php (102 B)
Edit
Rename
Del
Edit: Key.php
<?php namespace Firebase\JWT; use InvalidArgumentException; use OpenSSLAsymmetricKey; use OpenSSLCertificate; use TypeError; class Key { /** * @param string|resource|OpenSSLAsymmetricKey|OpenSSLCertificate $keyMaterial * @param string $algorithm */ public function __construct( private $keyMaterial, private string $algorithm ) { if ( !\is_string($keyMaterial) && !$keyMaterial instanceof OpenSSLAsymmetricKey && !$keyMaterial instanceof OpenSSLCertificate && !\is_resource($keyMaterial) ) { throw new TypeError('Key material must be a string, resource, or OpenSSLAsymmetricKey'); } if (empty($keyMaterial)) { throw new InvalidArgumentException('Key material must not be empty'); } if (empty($algorithm)) { throw new InvalidArgumentException('Algorithm must not be empty'); } } /** * Return the algorithm valid for this key * * @return string */ public function getAlgorithm(): string { return $this->algorithm; } /** * @return string|resource|OpenSSLAsymmetricKey|OpenSSLCertificate */ public function getKeyMaterial() { return $this->keyMaterial; } }
Simpan