PSR7Sessions\Storageless\Http\SessionMiddleware::fromAsymmetricKeyDefaults PHP Method

fromAsymmetricKeyDefaults() public static method

This constructor simplifies instantiation when using HTTPS (REQUIRED!) and asymmetric key encription based on RSA keys
public static fromAsymmetricKeyDefaults ( string $privateRsaKey, string $publicRsaKey, integer $expirationTime ) : SessionMiddleware
$privateRsaKey string
$publicRsaKey string
$expirationTime integer
return SessionMiddleware
    public static function fromAsymmetricKeyDefaults(string $privateRsaKey, string $publicRsaKey, int $expirationTime) : SessionMiddleware
    {
        return new self(new Signer\Rsa\Sha256(), $privateRsaKey, $publicRsaKey, SetCookie::create(self::DEFAULT_COOKIE)->withSecure(true)->withHttpOnly(true)->withPath('/'), new Parser(), $expirationTime, new SystemCurrentTime());
    }