Untitled

mail@pastecode.io avatar
unknown
plain_text
6 months ago
341 B
20
Indexable
Never
private bool check_string(string s)
{
	byte[] arr_b = Encoding.ASCII.GetBytes(s);

   
	if (arr_b.Length == 26)
	{
		int v = 0;
		byte b = 0;
		while (v < 24)
		{
			b = (byte)(b ^ arr_b[v]);
			v++;
		}

		bool s1 = (b & 15) != (arr_b[25] - 65);
		bool s2 = (b >> 4 & 15) == (arr_b[24] - 65);

		return s1 ? false : s2;
	}

	return false;
}