Spade

Mini Shell

Directory:~$ /home/lmsyaran/public_html/joomla5/libraries/vendor/web-auth/webauthn-lib/src/Util/
Upload File

[Home] [System Details] [Kill Me]
Current File:~$ /home/lmsyaran/public_html/joomla5/libraries/vendor/web-auth/webauthn-lib/src/Util/Base64.php

<?php

declare(strict_types=1);

namespace Webauthn\Util;

use ParagonIE\ConstantTime\Base64UrlSafe;
use Throwable;
use Webauthn\Exception\InvalidDataException;

abstract class Base64
{
    public static function decode(string $data): string
    {
        try {
            return Base64UrlSafe::decode($data);
        } catch (Throwable) {
        }

        try {
            return \ParagonIE\ConstantTime\Base64::decode($data, true);
        } catch (Throwable $e) {
            throw InvalidDataException::create($data, 'Invalid data
submitted', $e);
        }
    }
}