I wrote a console-based pseudo-encryption program for shits and giggles using C# in MonoDevelop (I'm on a Mac, so cut me some slack).
using System;
namespace PseudoCrypt
{
class MainClass
{
public static void Main (string[] args)
{
//Force input string
Start:
Console.Write ("String to encrypt: ");
//Check for input
String strtoenc = Console.ReadLine ();
//If it's blank, restart
if (strtoenc == "") goto Start;
if (strtoenc.ToLower ().Trim () == "exit") goto Finish;
//Retrieve a salt
Salt:
Console.Write ("Salt: ");
//Check for input again
String saltystr = Console.ReadLine ();
if (saltystr == "") goto Salt;
//Convert string from input to array[]
char[] encstr = strtoenc.ToCharArray ();
char[] salted = saltystr.ToCharArray ();
//String for cryption
string crypt = "";
int salt = 0;
//Loop through each character of the salt
for (int i = 0; i < salted.Length; i++) {
salt += (int)salted[i];
}
if (salt == 0) goto Salt;
//And loop through the string to crypt
for (int j = 0; j < encstr.Length; j++) {
int b = (int)encstr[j];
int c = ((b * 1024) / salt);
crypt += (char)c;
}
//Make sure we can properly output
if (crypt != "") {
Console.WriteLine (crypt);
} else {
goto Start;
}
//Start all over again
goto Start;
Finish:
Environment.Exit (0);
}
}
}
In action:
PseudoCrypt.exe.zip