@@ -33,7 +33,7 @@ public function generateKeys(?string $passphrase = null, ?array $configArgs = nu
33
33
34
34
if ($ keys ) {
35
35
openssl_pkey_export ($ keys , $ private );
36
- $ this ->privateKey = $ this ->_encryptPrivateKey (privateKey: $ private );
36
+ $ this ->privateKey = $ this ->encryptPrivateKey (privateKey: $ private );
37
37
38
38
$ pub = openssl_pkey_get_details ($ keys );
39
39
@@ -45,7 +45,7 @@ public function generateKeys(?string $passphrase = null, ?array $configArgs = nu
45
45
return $ this ;
46
46
}
47
47
48
- private function _encryptPrivateKey (string $ privateKey , string $ salt = 'salt ' ): string
48
+ private function encryptPrivateKey (string $ privateKey , string $ salt = 'salt ' ): string
49
49
{
50
50
$ aes = new AESCryptoServiceProvider ();
51
51
$ aes ->generateIV ();
@@ -56,7 +56,7 @@ private function _encryptPrivateKey(string $privateKey, string $salt = 'salt'):
56
56
return $ aes ->encrypt ($ privateKey );
57
57
}
58
58
59
- private function _decryptPrivateKey (string $ privateKey , string $ salt = 'salt ' ): string
59
+ private function decryptPrivateKey (string $ privateKey , string $ salt = 'salt ' ): string
60
60
{
61
61
$ aes = new AESCryptoServiceProvider ();
62
62
$ k = new CryptoKey ();
@@ -75,7 +75,7 @@ private function _decryptPrivateKey(string $privateKey, string $salt = 'salt'):
75
75
public function getPrivateKey (string $ salt = 'salt ' , bool $ encrypted = false ): \OpenSSLAsymmetricKey |string
76
76
{
77
77
if (!$ encrypted ) {
78
- return $ this ->_decryptPrivateKey (
78
+ return $ this ->decryptPrivateKey (
79
79
privateKey: $ this ->privateKey ,
80
80
salt: $ salt
81
81
);
0 commit comments