<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[XOR Verschlüsselung umwandeln]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich habe ein kleines Problem.</p>
<p>Ich versuche seit einiger Zeit eine XOR Verschlüsselung umzuwandeln.</p>
<p>Und zwar habe ich auf meiner Webseite eine XOR Verschlüsselung mit PHP.</p>
<p>Diesen Text würde ich nun gerne in C++ wieder umwandeln.<br />
Ich versuche das seit einiger Zeit aber irgendwie krieg ich das nicht hin. Vielleicht kann mir jemand helfen.</p>
<p>Und zwar sieht mein PHP Code so aus:</p>
<pre><code>function crypt($string)
{
$text = &quot;&quot;;
$my_key = 0x39;

for ($x = 0; $x &lt; strlen($string); $x++)
{

    $my_key = ord($string[$x]) ^ $my_key;
       $text .=  chr($my_key);

}
}
</code></pre>
<p>Wie ist es nun möglich den damit verschlüsselten Text in C++ wieder zu entschlüsseln?</p>
<p>Würde mich über jeden Tipp sehr freuen.</p>
<p>inspector1</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/194524/xor-verschlüsselung-umwandeln</link><generator>RSS for Node</generator><lastBuildDate>Tue, 30 Jun 2026 07:01:56 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/194524.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 07 Oct 2007 23:28:19 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to XOR Verschlüsselung umwandeln on Sun, 07 Oct 2007 23:28:19 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich habe ein kleines Problem.</p>
<p>Ich versuche seit einiger Zeit eine XOR Verschlüsselung umzuwandeln.</p>
<p>Und zwar habe ich auf meiner Webseite eine XOR Verschlüsselung mit PHP.</p>
<p>Diesen Text würde ich nun gerne in C++ wieder umwandeln.<br />
Ich versuche das seit einiger Zeit aber irgendwie krieg ich das nicht hin. Vielleicht kann mir jemand helfen.</p>
<p>Und zwar sieht mein PHP Code so aus:</p>
<pre><code>function crypt($string)
{
$text = &quot;&quot;;
$my_key = 0x39;

for ($x = 0; $x &lt; strlen($string); $x++)
{

    $my_key = ord($string[$x]) ^ $my_key;
       $text .=  chr($my_key);

}
}
</code></pre>
<p>Wie ist es nun möglich den damit verschlüsselten Text in C++ wieder zu entschlüsseln?</p>
<p>Würde mich über jeden Tipp sehr freuen.</p>
<p>inspector1</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1380171</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1380171</guid><dc:creator><![CDATA[inspector1]]></dc:creator><pubDate>Sun, 07 Oct 2007 23:28:19 GMT</pubDate></item><item><title><![CDATA[Reply to XOR Verschlüsselung umwandeln on Mon, 08 Oct 2007 04:23:37 GMT]]></title><description><![CDATA[<p>inspector1 schrieb:</p>
<blockquote>
<p>Diesen Text würde ich nun gerne in C++ wieder umwandeln.<br />
Ich versuche das seit einiger Zeit aber irgendwie krieg ich das nicht hin.</p>
</blockquote>
<p>zeig mal was du versucht hast.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1380178</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1380178</guid><dc:creator><![CDATA[sehen]]></dc:creator><pubDate>Mon, 08 Oct 2007 04:23:37 GMT</pubDate></item><item><title><![CDATA[Reply to XOR Verschlüsselung umwandeln on Mon, 08 Oct 2007 16:05:35 GMT]]></title><description><![CDATA[<p>Hi,</p>
<p>also ich hatte das so versucht.</p>
<pre><code class="language-cpp">string s = &quot;VERSCHLÜSSELTERTEXT&quot;;
string key =&quot;0x37&quot;;
char test[s.length()];
char *res;
strcpy(test,s.c_str());
for(int x=0;x&lt;s.length();x++)
{
        key = int(test[x])^key;
}
</code></pre>
<p>Ich weiss das da auch noch die Zuweisung für die Ausgabe fehlt aber ich erhalte schon bei diesem Programm Compiler Fehlermeldungen. Und zwar erst bei der XOR Operation.</p>
<p>Irgendwie komm ich nicht drauf wie ich das machen könnte.</p>
<p>inspector1</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1380606</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1380606</guid><dc:creator><![CDATA[inspector1]]></dc:creator><pubDate>Mon, 08 Oct 2007 16:05:35 GMT</pubDate></item><item><title><![CDATA[Reply to XOR Verschlüsselung umwandeln on Mon, 08 Oct 2007 16:14:08 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">std::string s = &quot;VERSCHLÜSSELTERTEXT&quot;;
int key = 0x37;
for (int i = 0; i &lt; s.length(); i++)
    s[i] ^= key;
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1380617</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1380617</guid><dc:creator><![CDATA[hustbaer]]></dc:creator><pubDate>Mon, 08 Oct 2007 16:14:08 GMT</pubDate></item><item><title><![CDATA[Reply to XOR Verschlüsselung umwandeln on Mon, 08 Oct 2007 16:16:23 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>vielen Dank für die schnelle Antwort.</p>
<p>Aber das Problem ist ja das der Key sich jedes Mal verändert. Also bei dem PHP Code nimmt er ja immer dann den vorherigen Key zum entschlüsseln. Es wird bei jedem Durchgang ein neuer Zugewiesen.</p>
<p>inspector1</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1380618</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1380618</guid><dc:creator><![CDATA[inspector1]]></dc:creator><pubDate>Mon, 08 Oct 2007 16:16:23 GMT</pubDate></item><item><title><![CDATA[Reply to XOR Verschlüsselung umwandeln on Mon, 08 Oct 2007 16:21:15 GMT]]></title><description><![CDATA[<p>Ich meinte natürlich das beim PHP Code verschlüsselt wird. Und sich dabei der Key immer verändert.</p>
<p>Das möchte ich ja nun mit C++ entschlüsseln</p>
<p>inspector1</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1380627</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1380627</guid><dc:creator><![CDATA[inspector1]]></dc:creator><pubDate>Mon, 08 Oct 2007 16:21:15 GMT</pubDate></item><item><title><![CDATA[Reply to XOR Verschlüsselung umwandeln on Mon, 08 Oct 2007 17:23:22 GMT]]></title><description><![CDATA[<p>was soll das bedeuten? &quot;immer verändert&quot;? mach mal ein beispiel.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1380686</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1380686</guid><dc:creator><![CDATA[und]]></dc:creator><pubDate>Mon, 08 Oct 2007 17:23:22 GMT</pubDate></item><item><title><![CDATA[Reply to XOR Verschlüsselung umwandeln on Mon, 08 Oct 2007 19:26:43 GMT]]></title><description><![CDATA[<p>Hopps, hatte ich übersehen.<br />
Müsste so gehen schätze ich mal:</p>
<pre><code class="language-cpp">std::string s = &quot;VERSCHLÜSSELTERTEXT&quot;; 
int key = 0x37; 
for (int i = 0; i &lt; s.length(); i++) 
{
    s[i] ^= key; 
    key ^= s[i];
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1380775</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1380775</guid><dc:creator><![CDATA[hustbaer]]></dc:creator><pubDate>Mon, 08 Oct 2007 19:26:43 GMT</pubDate></item><item><title><![CDATA[Reply to XOR Verschlüsselung umwandeln on Mon, 08 Oct 2007 21:13:41 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>vielen Dank. Es hat super funktioniert.</p>
<p>Das ist echt eines der besten Foren die ich kenne.</p>
<p>Nochmals vielen Dank für deine Hilfe.</p>
<p>inspector1</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1380872</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1380872</guid><dc:creator><![CDATA[inspector1]]></dc:creator><pubDate>Mon, 08 Oct 2007 21:13:41 GMT</pubDate></item></channel></rss>