3 ms·
This should do it in C#: string Vigenere(string text, string key) => string.Join("", text.Select((p, k) => p < 'A' || p > 'Z' ? p : (char)((p + key[k % key.L
by sterlind 5y ago
This should do it in C#:
string Vigenere(string text, string key) => string.Join("", text.Select((p, k) => p < 'A' || p > 'Z' ? p : (char)((p + key[k % key.Length]) % 26 + 85)));