CoreFiles by mySites.guru
Base64.php26 lines, 574 bytes, from Joomla_6.2.0-Stable-Full_Package.zip
Raw History Compare with 6.1.4
md5
1a5b9c738eee34fdb21fd6224c134974
sha1
08dfb782f4309b60f8ac260aa38a2b43658fb0c0
sha256
ab2d647fa378b55ac22d8c3f925decf72406eb643cbadc2a511e9ad9d6b14d85
<?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);
        }
    }
}

The same content is in 155 releases, Joomla 5.0.0-alpha1 to 6.2.1-rc1. See them all, or every version of this file.