Esempio n. 1
0
	public static bool PaddingTest(Aes aes, PaddingMode mode, int offset, byte[] expected)
	{
		if (!CompareBytes(GetPaddingBytes(aes, mode, offset), expected))
		{
			Console.WriteLine("Error - padding failure");
			Console.WriteLine("Algorithm: {0}", aes.ToString());
			Console.WriteLine("Padding Mode: {0}", mode.ToString());
			Console.WriteLine("Block Size: {0}", BlockSizeBytes + offset);
			return false;
		}

		return true;
	}