__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
<?php
declare(strict_types=1);
namespace PhpMyAdmin\WebAuthn;
use function fopen;
use function fread;
use function ftell;
use function fwrite;
use function rewind;
final class DataStream
{
/** @var resource */
private $stream;
/**
* @throws WebAuthnException
*/
public function __construct(string $binaryString)
{
$resource = fopen('php://memory', 'rb+');
if ($resource === false || fwrite($resource, $binaryString) === false) {
throw new WebAuthnException();
}
if (! rewind($resource)) {
throw new WebAuthnException();
}
$this->stream = $resource;
}
/**
* @throws WebAuthnException
*/
public function take(int $length): string
{
if ($length < 0) {
throw new WebAuthnException();
}
if ($length === 0) {
return '';
}
$string = fread($this->stream, $length);
if ($string === false) {
throw new WebAuthnException();
}
return $string;
}
/**
* @throws WebAuthnException
*/
public function getPosition(): int
{
$position = ftell($this->stream);
if ($position === false) {
throw new WebAuthnException();
}
return $position;
}
}
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| CBORDecoder.php | File | 7.22 KB | 0644 |
|
| CustomServer.php | File | 18.74 KB | 0644 |
|
| DataStream.php | File | 1.3 KB | 0644 |
|
| Server.php | File | 2.29 KB | 0644 |
|
| WebAuthnException.php | File | 127 B | 0644 |
|
| WebauthnLibServer.php | File | 11.34 KB | 0644 |
|