Skip to content

Commit dd04ae0

Browse files
author
May Meow
committed
allow to set keys from generateKeys into another variable
1 parent a996e98 commit dd04ae0

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/RSAParameters.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,12 @@ public function __construct()
1818
{
1919
}
2020

21-
public function generateKeys(?string $passphrase = null, ?array $configArgs = null) : void
21+
/**
22+
* @param string|null $passphrase
23+
* @param array|null $configArgs
24+
* @return RSACryptoServiceProvider
25+
*/
26+
public function generateKeys(?string $passphrase = null, ?array $configArgs = null) : RSACryptoServiceProvider
2227
{
2328
$keys = openssl_pkey_new($this->config);
2429

@@ -31,6 +36,8 @@ public function generateKeys(?string $passphrase = null, ?array $configArgs = nu
3136

3237
$pub = openssl_pkey_get_details($keys);
3338
$this->publicKey = $pub['key'];
39+
40+
return $this;
3441
}
3542

3643
/**

0 commit comments

Comments
 (0)