<?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[Brauche Hilfe bei Fehlersuche!]]></title><description><![CDATA[<p>Hallo zusammen!</p>
<p>Ich versuche gerade ein simples Programm zu testen, auf dem ich dann weiter aufbauen will später. Leider bekomme ich dieses schon nicht zum laufen (was wohl daran liegt, dass mein letztes C++ Projekt ein paar Jahre zurück liegt). Wo liegt mein Fehler?<br />
Nutze CryptoPP...</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;

// Crypto++ Includes
#include &lt;cryptopp/cryptlib.h&gt;
#include &lt;cryptopp/modes.h&gt;
#include &lt;cryptopp/filters.h&gt;

using namespace CryptoPP;

int main(int argc, char* argv[]) {

    // Key and IV setup
    byte key[ AES::DEFAULT_KEYLENGTH ]; 
    byte iv[ AES::BLOCKSIZE ];

    ::memset( key, 0x01, AES::DEFAULT_KEYLENGTH );
    ::memset(  iv, 0x01, AES::BLOCKSIZE );

    // Message M
    std::string PlainText = &quot;Hello World&quot;;

    // Cipher Text Sink
    std::string CipherText;

    // Encryptor
    ECB_Mode&lt;AES&gt;::Encryption Encryptor( key, sizeof(key), iv );

    // Encryption
    StringSource( PlainText, true,
        new StreamTransformationFilter( Encryptor,
            new StringSink( CipherText )
        )
    );

    // Recovered Text Sink
    std::string RecoveredText;

    // Decryptor
    ECB_Mode&lt;AES&gt;::Decryption Decryptor( key, sizeof(key), iv );

    // Decryption
    StringSource( CipherText, true,
        new StreamTransformationFilter( Decryptor,
            new StringSink( RecoveredText )
        )
    );

    std::cout &lt;&lt; &quot;Algorithm:&quot; &lt;&lt; std::endl;
    std::cout &lt;&lt; &quot;  &quot; &lt;&lt; Encryptor.AlgorithmName() &lt;&lt; std::endl;
    std::cout &lt;&lt; &quot;Minimum Key Size:&quot; &lt;&lt; std::endl;
    std::cout &lt;&lt; &quot;  &quot; &lt;&lt; Encryptor.MinKeyLength() &lt;&lt; &quot; bytes&quot; &lt;&lt; std::endl;
    std::cout &lt;&lt; std::endl;

    std::cout &lt;&lt; &quot;Plain Text (&quot; &lt;&lt; PlainText.length() &lt;&lt; &quot; bytes)&quot; &lt;&lt; std::endl;
    std::cout &lt;&lt; &quot;  '&quot; &lt;&lt; PlainText &lt;&lt; &quot;'&quot; &lt;&lt; std::endl;
    std::cout &lt;&lt; std::endl;

    std::cout &lt;&lt; &quot;Recovered Text:&quot; &lt;&lt; std::endl;
    std::cout &lt;&lt; &quot;  '&quot; &lt;&lt; RecoveredText &lt;&lt; &quot;'&quot; &lt;&lt; std::endl;
    std::cout &lt;&lt; std::endl;

    return 0;
}
</code></pre>
<p>Beim compilieren kommt folgendes:</p>
<blockquote>
<p>g++ -c -o crypt.o crypt.cpp<br />
crypt.cpp: In function <code>int main(int, char**)': crypt.cpp:16: error:</code>AES' has not been declared<br />
crypt.cpp:16: error: <code>DEFAULT_KEYLENGTH' undeclared (first use this function) crypt.cpp:16: error: (Each undeclared identifier is reported only once for each function it appears in.) crypt.cpp:17: error:</code>AES' has not been declared<br />
crypt.cpp:17: error: <code>BLOCKSIZE' undeclared (first use this function) crypt.cpp:19: error:</code>key' undeclared (first use this function)<br />
crypt.cpp:19: error: <code>AES' has not been declared crypt.cpp:20: error:</code>iv' undeclared (first use this function)<br />
crypt.cpp:20: error: <code>AES' has not been declared crypt.cpp:29: error:</code>AES' undeclared (first use this function)<br />
crypt.cpp:29: error: template argument 1 is invalid<br />
crypt.cpp:29: error: <code>Encryption' does not name a type crypt.cpp:33: error:</code>Encryptor' undeclared (first use this function)<br />
crypt.cpp:42: error: template argument 1 is invalid<br />
crypt.cpp:42: error: <code>Decryption' does not name a type crypt.cpp:46: error:</code>Decryptor' undeclared (first use this function)<br />
make: *** [crypt.o] Error 1</p>
</blockquote>
]]></description><link>https://www.c-plusplus.net/forum/topic/221621/brauche-hilfe-bei-fehlersuche</link><generator>RSS for Node</generator><lastBuildDate>Tue, 06 Oct 2026 03:21:49 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/221621.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 01 Sep 2008 11:15:05 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Brauche Hilfe bei Fehlersuche! on Mon, 01 Sep 2008 11:15:05 GMT]]></title><description><![CDATA[<p>Hallo zusammen!</p>
<p>Ich versuche gerade ein simples Programm zu testen, auf dem ich dann weiter aufbauen will später. Leider bekomme ich dieses schon nicht zum laufen (was wohl daran liegt, dass mein letztes C++ Projekt ein paar Jahre zurück liegt). Wo liegt mein Fehler?<br />
Nutze CryptoPP...</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;

// Crypto++ Includes
#include &lt;cryptopp/cryptlib.h&gt;
#include &lt;cryptopp/modes.h&gt;
#include &lt;cryptopp/filters.h&gt;

using namespace CryptoPP;

int main(int argc, char* argv[]) {

    // Key and IV setup
    byte key[ AES::DEFAULT_KEYLENGTH ]; 
    byte iv[ AES::BLOCKSIZE ];

    ::memset( key, 0x01, AES::DEFAULT_KEYLENGTH );
    ::memset(  iv, 0x01, AES::BLOCKSIZE );

    // Message M
    std::string PlainText = &quot;Hello World&quot;;

    // Cipher Text Sink
    std::string CipherText;

    // Encryptor
    ECB_Mode&lt;AES&gt;::Encryption Encryptor( key, sizeof(key), iv );

    // Encryption
    StringSource( PlainText, true,
        new StreamTransformationFilter( Encryptor,
            new StringSink( CipherText )
        )
    );

    // Recovered Text Sink
    std::string RecoveredText;

    // Decryptor
    ECB_Mode&lt;AES&gt;::Decryption Decryptor( key, sizeof(key), iv );

    // Decryption
    StringSource( CipherText, true,
        new StreamTransformationFilter( Decryptor,
            new StringSink( RecoveredText )
        )
    );

    std::cout &lt;&lt; &quot;Algorithm:&quot; &lt;&lt; std::endl;
    std::cout &lt;&lt; &quot;  &quot; &lt;&lt; Encryptor.AlgorithmName() &lt;&lt; std::endl;
    std::cout &lt;&lt; &quot;Minimum Key Size:&quot; &lt;&lt; std::endl;
    std::cout &lt;&lt; &quot;  &quot; &lt;&lt; Encryptor.MinKeyLength() &lt;&lt; &quot; bytes&quot; &lt;&lt; std::endl;
    std::cout &lt;&lt; std::endl;

    std::cout &lt;&lt; &quot;Plain Text (&quot; &lt;&lt; PlainText.length() &lt;&lt; &quot; bytes)&quot; &lt;&lt; std::endl;
    std::cout &lt;&lt; &quot;  '&quot; &lt;&lt; PlainText &lt;&lt; &quot;'&quot; &lt;&lt; std::endl;
    std::cout &lt;&lt; std::endl;

    std::cout &lt;&lt; &quot;Recovered Text:&quot; &lt;&lt; std::endl;
    std::cout &lt;&lt; &quot;  '&quot; &lt;&lt; RecoveredText &lt;&lt; &quot;'&quot; &lt;&lt; std::endl;
    std::cout &lt;&lt; std::endl;

    return 0;
}
</code></pre>
<p>Beim compilieren kommt folgendes:</p>
<blockquote>
<p>g++ -c -o crypt.o crypt.cpp<br />
crypt.cpp: In function <code>int main(int, char**)': crypt.cpp:16: error:</code>AES' has not been declared<br />
crypt.cpp:16: error: <code>DEFAULT_KEYLENGTH' undeclared (first use this function) crypt.cpp:16: error: (Each undeclared identifier is reported only once for each function it appears in.) crypt.cpp:17: error:</code>AES' has not been declared<br />
crypt.cpp:17: error: <code>BLOCKSIZE' undeclared (first use this function) crypt.cpp:19: error:</code>key' undeclared (first use this function)<br />
crypt.cpp:19: error: <code>AES' has not been declared crypt.cpp:20: error:</code>iv' undeclared (first use this function)<br />
crypt.cpp:20: error: <code>AES' has not been declared crypt.cpp:29: error:</code>AES' undeclared (first use this function)<br />
crypt.cpp:29: error: template argument 1 is invalid<br />
crypt.cpp:29: error: <code>Encryption' does not name a type crypt.cpp:33: error:</code>Encryptor' undeclared (first use this function)<br />
crypt.cpp:42: error: template argument 1 is invalid<br />
crypt.cpp:42: error: <code>Decryption' does not name a type crypt.cpp:46: error:</code>Decryptor' undeclared (first use this function)<br />
make: *** [crypt.o] Error 1</p>
</blockquote>
]]></description><link>https://www.c-plusplus.net/forum/post/1574594</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1574594</guid><dc:creator><![CDATA[H2]]></dc:creator><pubDate>Mon, 01 Sep 2008 11:15:05 GMT</pubDate></item><item><title><![CDATA[Reply to Brauche Hilfe bei Fehlersuche! on Mon, 01 Sep 2008 11:26:35 GMT]]></title><description><![CDATA[<p>evtl. hilft ein</p>
<pre><code class="language-cpp">#include &lt;cryptopp/aes.h&gt;
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1574607</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1574607</guid><dc:creator><![CDATA[Airdamn]]></dc:creator><pubDate>Mon, 01 Sep 2008 11:26:35 GMT</pubDate></item><item><title><![CDATA[Reply to Brauche Hilfe bei Fehlersuche! on Mon, 01 Sep 2008 11:28:16 GMT]]></title><description><![CDATA[<p>Wie aus den Fehlermeldungen erkennbar ist, sind einige Bezeichner noch undeklariert. Wahrscheinlich hast du vergessen, einen Header einzubinden.</p>
<p>Wenn du meinst, die Headerdateien sollten stimmen, so schau doch in ihnen nach, ob die entsprechenden Bezeichner auch irgendwo deklariert sind.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1574609</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1574609</guid><dc:creator><![CDATA[Nexus]]></dc:creator><pubDate>Mon, 01 Sep 2008 11:28:16 GMT</pubDate></item></channel></rss>