Bonjour,
J'aimerais faire une fonction permettant de "crypter" un texte en décalant les lettres dans un tableau, exemple :
ToEncrypt = "test"
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10 string result = null; public static string Encrypt(string ToEncrypt) { for (int x = 0; x < ToEncrypt.Length; x++) { result += ToEncrypt.Replace(ToEncrypt[x], hash[x]); } return result; }
J'obtiens l'erreur : L'index se trouve en dehors des limites du tableau.
Merci pour toute aide,
T4unt.
Partager