CoreFiles by mySites.guru
Keychain.php44 lines, 994 bytes, from Joomla_4.2.0-beta3-Beta-Full_Package.zip
Raw History Compare with 4.2.0-beta2
md5
3d4c1bebd1cc910b7ad4d9338303ae32
sha1
c7edfa8d8d0e00c74e71e00122215141cd5b6f96
sha256
0b5925964f70104fbe59268d25d86683f6ed9db52dd638c8d34f895200583e07
<?php
/**
 * This file is part of Lcobucci\JWT, a simple library to handle JWT and JWS
 *
 * @license http://opensource.org/licenses/BSD-3-Clause BSD-3-Clause
 */

namespace Lcobucci\JWT\Signer;

/**
 * A utilitarian class that encapsulates the retrieval of public and private keys
 *
 * @author Luís Otávio Cobucci Oblonczyk <[email protected]>
 * @since 2.1.0
 *
 * @deprecated Since we've removed OpenSSL from ECDSA there's no reason to use this class
 */
class Keychain
{
    /**
     * Returns a private key from file path or content
     *
     * @param string $key
     * @param string $passphrase
     *
     * @return Key
     */
    public function getPrivateKey($key, $passphrase = null)
    {
        return new Key($key, $passphrase);
    }

    /**
     * Returns a public key from file path or content
     *
     * @param string $certificate
     *
     * @return Key
     */
    public function getPublicKey($certificate)
    {
        return new Key($certificate);
    }
}

The same content is in 75 releases, Joomla 4.2.0-beta3 to 4.4.14. See them all, or every version of this file.