HEX
Server: Apache
System: Linux srv13.cpanelhost.cl 3.10.0-962.3.2.lve1.5.38.el7.x86_64 #1 SMP Thu Jun 18 05:28:41 EDT 2020 x86_64
User: cca63905 (4205)
PHP: 7.3.20
Disabled: NONE
Upload Files
File: //proc/self/cwd/nueva/modules/ps_accounts/vendor/lcobucci/jwt/src/Signer/Key/InMemory.php
<?php

namespace PrestaShop\Module\PsAccounts\Vendor\Lcobucci\JWT\Signer\Key;

use PrestaShop\Module\PsAccounts\Vendor\Lcobucci\JWT\Encoding\CannotDecodeContent;
use PrestaShop\Module\PsAccounts\Vendor\Lcobucci\JWT\Signer\Key;
use function base64_decode;
final class InMemory extends Key
{
    /**
     * @param string $contents
     * @param string $passphrase
     *
     * @return self
     */
    public static function plainText($contents, $passphrase = '')
    {
        return new self($contents, $passphrase);
    }
    /**
     * @param string $contents
     * @param string $passphrase
     *
     * @return self
     */
    public static function base64Encoded($contents, $passphrase = '')
    {
        $decoded = base64_decode($contents, \true);
        if ($decoded === \false) {
            throw CannotDecodeContent::invalidBase64String();
        }
        return new self($decoded, $passphrase);
    }
    /**
     * @param string $path
     * @param string $passphrase
     *
     * @return InMemory
     *
     * @throws FileCouldNotBeRead
     */
    public static function file($path, $passphrase = '')
    {
        return new self('file://' . $path, $passphrase);
    }
}