Auch mir tuts leid, ich hab dein Verfahren soeben inerhalb von 5 Minuten nachgebaut. Mit weniger als 50 Zeilen code 
Edit: Durch ein paar Änderungen ist der Quellcode etwas gewachsen
Hier der Quellcode:
Mich würde nun interessieren wie das "Original" aussieht bzw. aussah

Edit: Durch ein paar Änderungen ist der Quellcode etwas gewachsen

Hier der Quellcode:
Code:
#include <iostream>
#include <string>
#include <vector>
#include <sstream>
const std::string Encrypt( const std::string& Text, const std::string& Key );
const std::string Decrypt( const std::string& Text, const std::string& Key );
int main ( void )
{
std::string strKey;
std::cout << "Enter key: ";
std::getline( std::cin, strKey );
std::string strEncrypt;
std::cout << "Enter string to encrypt: ";
std::getline( std::cin, strEncrypt );
std::cout << "\n--- O u t p u t ---\n\n";
std::string Encrypted = Encrypt( strEncrypt, strKey );
std::string Decrypted = Decrypt( Encrypted, strKey );
std::cout << "* Key:\t\t" << strKey << "\n";
std::cout << "* Encrypted:\t" << Encrypted << "\n";
std::cout << "* Decrypted:\t" << Decrypted << "\n\n";
return 0;
}
const std::string Encrypt( const std::string& Text, const std::string& Key )
{
std::stringstream Result;
for ( unsigned int i = 0, TheKey = 0; i < Text.length(); i++ )
{
// Dient(e) scheinbar als Trennung :-)
// |
// v
Result << "00" << Text[i] + Key[TheKey++];
if ( TheKey > Key.length() - 1 )
TheKey = 0;
}
return Result.str();
}
const std::string Decrypt( const std::string& Text, const std::string& Key )
{
std::string Result = "";
for ( unsigned int i = 0, TheKey = 0; i < Text.length(); i += 5 )
{
Result += char ( atoi ( Text.substr( i, 5 ).c_str() ) - Key[TheKey++] );
if ( TheKey > Key.length() - 1 )
TheKey = 0;
}
return Result;
}
Mich würde nun interessieren wie das "Original" aussieht bzw. aussah