Advertisement
Guest User

Untitled

a guest
Dec 9th, 2016
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. private void btn_Encrypt_Click(object sender, EventArgs e)
  2. {
  3. //limpar a box de decrypt
  4. txtBoxDecriptar.Text = string.Empty;
  5.  
  6. //Intera todas as letra do texto puro
  7. for (int i = 0; i < txtBoxEncriptar.Text.Length; i++)
  8.  
  9. {
  10.  
  11. //Devolve o código ASCII da letra
  12. int ASCII = (int)txtBoxEncriptar.Text[i];
  13.  
  14. //Coloca a chave fixa de 10 posições a mais no número da tabela ASCII
  15. int ASCIIC = ASCII + 4;
  16.  
  17. //Concatena o texto na caixa de texto do texto crifrado
  18. txtBoxDecriptar.Text += Char.ConvertFromUtf32(ASCIIC);
  19. }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement