Neos\Flow\Security\Cryptography\RsaWalletServicePhp::decryptWithPrivateKey PHP 메소드

decryptWithPrivateKey() 개인적인 메소드

Decrypts the given ciphertext with the given private key
private decryptWithPrivateKey ( string $cipher, OpenSslRsaKey $privateKey ) : string
$cipher string The ciphertext to decrypt
$privateKey OpenSslRsaKey The private key
리턴 string The decrypted plaintext
    private function decryptWithPrivateKey($cipher, OpenSslRsaKey $privateKey)
    {
        $decrypted = '';
        $key = openssl_pkey_get_private($privateKey->getKeyString());
        openssl_private_decrypt($cipher, $decrypted, $key);
        return $decrypted;
    }