Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void btn_Encrypt_Click(object sender, EventArgs e)
- {
- //limpar a box de decrypt
- txtBoxDecriptar.Text = string.Empty;
- //Intera todas as letra do texto puro
- for (int i = 0; i < txtBoxEncriptar.Text.Length; i++)
- {
- //Devolve o código ASCII da letra
- int ASCII = (int)txtBoxEncriptar.Text[i];
- //Coloca a chave fixa de 10 posições a mais no número da tabela ASCII
- int ASCIIC = ASCII + 4;
- //Concatena o texto na caixa de texto do texto crifrado
- txtBoxDecriptar.Text += Char.ConvertFromUtf32(ASCIIC);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement