public string decrypt(IMethod method, string encrypted, int value) { var info = stringDecrypterMethods.findAny(method); char[] chars = encrypted.ToCharArray(); byte key = (byte)(info.magic + value); for (int i = 0; i < chars.Length; i++) { char c = chars[i]; byte b1 = (byte)((byte)c ^ key++); byte b2 = (byte)((byte)(c >> 8) ^ key++); chars[i] = (char)((b1 << 8) | b2); } return(new string(chars)); }