public function encryptWithPublicKey($plaintext, $fingerprint)
    {
        $cipher = '';
        if (openssl_public_encrypt($plaintext, $cipher, $this->getPublicKey($fingerprint)->getKeyString(), $this->paddingAlgorithm) === false) {
            $openSslErrors = [];
            while (($errorMessage = openssl_error_string()) !== false) {
                $openSslErrors[] = $errorMessage;
            }
            throw new SecurityException(sprintf('Encryption failed, OpenSSL error: %s', implode(chr(10), $openSslErrors)), 1556609369);
        }

        return $cipher;
    }