src/mako/security/crypto/CryptoManager.php
protected function instantiate(string $configuration): Crypto
	{
		if(!isset($this->configurations[$configuration]))
		{
			throw new RuntimeException(vsprintf('[ %s ] has not been defined in the crypto configuration.', [$configuration]));
		}

		$configuration = $this->configurations[$configuration];

		return new Crypto($this->factory($configuration['library'], $configuration), $this->container->get(Signer::class));
	}
protected function instantiate(string $configuration): Crypto
	{
		if(!isset($this->configurations[$configuration]))
		{
			throw new RuntimeException(vsprintf('[ %s ] has not been defined in the crypto configuration.', [$configuration]));
		}

		$configuration = $this->configurations[$configuration];

		return new Crypto($this->factory($configuration['library'], $configuration), $this->container->get(Signer::class));
	}
protected function instantiate ( string $ configuration ) : Crypto { if ( ! isset ( $ this -> configurations [ $ configuration ] ) ) { throw new RuntimeException ( vsprintf ( '[ %s ] has not been defined in the crypto configuration.' , [ $ configuration ] ) ) ; } $ configuration = $ this -> configurations [ $ configuration ] ; return new Crypto ( $ this -> factory ( $ configuration [ 'library' ] , $ configuration ) , $ this -> container -> get ( Signer :: class ) ) ; }
Returns a crypto instance.

@param  string                       $configuration Configuration name
@throws \RuntimeException
@return \mako\security\crypto\Crypto
Returns a crypto instance .