There are different methods for encrypting texts. But I have tried the simple way ,However I applied for combined text and color.This piece of software is the version 0.0 of the program i written .
Quote:
I Just trying to convert ASCII to hex and reverse.I hope this simple program help you.
- Convert text (ASCII table) to Hex
- byte Convert ->Hex and Encoding->ASCII with Split('-');
if you want save your text in image you can see this Tips/Trick
private void button1_Click(object sender, EventArgs e)
{
if (dcodingToolStripMenuItem.Checked == false)
{
byte[] table = { 1, 2 };
for (int i = 0; i <= richTextBox1.Lines.Length - 1; i++)
{
string n = richTextBox1.Lines[i];
string myHexString = BitConverter.ToString(Encoding.ASCII.GetBytes(n)); myHexString.ToString(); listBox1.Items.Add(myHexString);
}
}
if (dcodingToolStripMenuItem.Checked == true)
{
try
{
for (int i = 0; i <= richTextBox1.Lines.Length - 1; i++)
{
string n = richTextBox1.Lines[i];
string[] parts = n.Split('-');
decode2 = "";
for (int i2 = 0; i2 <= parts.Length - 1; i2++)
{
if (parts[i2] != "")
{
int value = Convert.ToInt32(parts[i2], 16);
decode2 += Convert.ToChar(value);
}
}
listBox1.Items.Add(decode2);
}
}
catch
{
MessageBox.Show("not find Split('-')");
}
}