<?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üsslung]]></title><description><![CDATA[<p>Hallo,</p>
<p>würde gerne einen String XOR Verschlüsseln.</p>
<p>z.B.<br />
String s = &quot;test&quot; // zu verschlüsselnder String<br />
String sBinKey = &quot;1001&quot; // Dualzahl zum verschlüsseln</p>
<p>Wie mach ich das?</p>
<p>Bitte um ein Beispiel,<br />
danke im Voraus</p>
<p>Gruß<br />
IcemanX</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/160126/xor-verschlüsslung</link><generator>RSS for Node</generator><lastBuildDate>Tue, 11 Aug 2026 06:12:08 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/160126.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 22 Sep 2006 09:01:54 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to XOR Verschlüsslung on Fri, 22 Sep 2006 09:01:54 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>würde gerne einen String XOR Verschlüsseln.</p>
<p>z.B.<br />
String s = &quot;test&quot; // zu verschlüsselnder String<br />
String sBinKey = &quot;1001&quot; // Dualzahl zum verschlüsseln</p>
<p>Wie mach ich das?</p>
<p>Bitte um ein Beispiel,<br />
danke im Voraus</p>
<p>Gruß<br />
IcemanX</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1142394</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1142394</guid><dc:creator><![CDATA[IcemanX]]></dc:creator><pubDate>Fri, 22 Sep 2006 09:01:54 GMT</pubDate></item><item><title><![CDATA[Reply to XOR Verschlüsslung on Fri, 22 Sep 2006 09:10:15 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">char Key;
Key='a';
char *String=&quot;Hallo&quot;;
int b;

for(int i=0;i&lt;strlen(String);i++)
{
b=String[i];
asm{
mov eax,b
mov ebx,Key
xor eax,ebx
mov b,eax
}
String[i]=b;
}
</code></pre>
<p>Bitte nicht hauen, wenns falsch ist, hab gard keinen BCB. Aber irgendwie so in etwa müsste es gehen <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1142397</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1142397</guid><dc:creator><![CDATA[GCoder]]></dc:creator><pubDate>Fri, 22 Sep 2006 09:10:15 GMT</pubDate></item><item><title><![CDATA[Reply to XOR Verschlüsslung on Fri, 22 Sep 2006 09:11:02 GMT]]></title><description><![CDATA[<p>Der Operator hierfür ist ^.<br />
Einfach auf jedes Zeichen (beider Strings) anwenden.</p>
<p>P.S: Dein Schlüssel &quot;1001&quot; ist nicht so toll.<br />
Am besten, du beschäftigst dich ein bißchen mit der Binärdarstellung der (ASCII-) Zeichen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1142398</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1142398</guid><dc:creator><![CDATA[Th]]></dc:creator><pubDate>Fri, 22 Sep 2006 09:11:02 GMT</pubDate></item><item><title><![CDATA[Reply to XOR Verschlüsslung on Mon, 25 Sep 2006 08:58:23 GMT]]></title><description><![CDATA[<p>Erst ein mal einen lieben dank <a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/13228">@GCoder</a> und <a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/9348">@Th</a>,</p>
<p>möchte halt wirklich z.B. die Dualzahl 1001 als Schlüssel verwenden,<br />
mir ist klar wie Hexzahlen verwende, aber wie benutze ich Dual-Zahlen in C++,<br />
gibt es da auch was wie die Darstellung z.B. 0xFFAA00.<br />
Das Zeichen für XOR war mir auch bewust, hätte mich wohl besser ausdrücken sollen.</p>
<p>Lg<br />
IcemanX</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1143837</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1143837</guid><dc:creator><![CDATA[IcemanX]]></dc:creator><pubDate>Mon, 25 Sep 2006 08:58:23 GMT</pubDate></item><item><title><![CDATA[Reply to XOR Verschlüsslung on Mon, 25 Sep 2006 09:09:01 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>Intern werden alle Integers im Dualsystem behandelt. Nur die Darstellung kann varieren. Deshalb kannst du ruhig den Schlüssel als Hexcode übergeben.</p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1143845</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1143845</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Mon, 25 Sep 2006 09:09:01 GMT</pubDate></item><item><title><![CDATA[Reply to XOR Verschlüsslung on Mon, 25 Sep 2006 10:11:31 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/7971">@akari</a></p>
<p>Und wie stelle ich mit C++ 1001 jetzt nun dar? Hatte an eine Funktion gedacht wie DualToHex(String bin), fühle mich grad unverstanden, war es echt so unverständlich?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1143913</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1143913</guid><dc:creator><![CDATA[IcemanX]]></dc:creator><pubDate>Mon, 25 Sep 2006 10:11:31 GMT</pubDate></item><item><title><![CDATA[Reply to XOR Verschlüsslung on Mon, 25 Sep 2006 10:47:50 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>Eine solche Funktion brauchst du wirklich nicht.<br />
Um nochmal auf den eigentlichen Zweck zurückzukommen :<br />
Du willst eine zeichenkette kodieren. Zeichenketten bestehen aus chars, die sind bereits integrale Typen mit denen du einzelne Integer-Operationen machen kannst.<br />
Nehmen wir mal ein einfaches Beispiel :</p>
<pre><code class="language-cpp">AnsiString Text =&quot;Test&quot;;
char Code = 0xA0; // Einstelliger Code
Text[1] = Text[1] ^ Code; // Ein Zeichen des Textes wird kodiert
</code></pre>
<p>Aus dem Beispiel solltest du dir jetzt ableiten, wie du<br />
- alle Zeichen des Textes kodierst<br />
- einen mehrstelligen Code verwenden kannst.</p>
<p>Das heißt vergiß das Denken in Dual und Hex, das übernimmt der Compiler für dich.</p>
<p>Ein Problem ist aber noch : der Datentyp AnsiString (wie jede andere Strin gklasse) eignet sich nur bedingt zum Kodieren. Denn sobald als Ergebnis der Operation der Wert 0 (nicht '0', sondern '\0') herauskommt, kommt es zu Fehlern da dieses Zeichen als Endzeichen betrachtet wird.<br />
Nimm also lieber StringStreams oder FileStreams.</p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1143938</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1143938</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Mon, 25 Sep 2006 10:47:50 GMT</pubDate></item><item><title><![CDATA[Reply to XOR Verschlüsslung on Mon, 25 Sep 2006 12:08:56 GMT]]></title><description><![CDATA[<p>dual 1001 entsprichte also 0x09 (Hex) oder 9 (dezimal) oder 011 (oktal).</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1144004</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1144004</guid><dc:creator><![CDATA[Braunstein]]></dc:creator><pubDate>Mon, 25 Sep 2006 12:08:56 GMT</pubDate></item></channel></rss>