MonoTests.System.Security.Cryptography.DebugStream.Flush C# (CSharp) Method

Flush() public method

public Flush ( ) : void
return void
		public override void Flush () 
		{
			base.Flush ();
		}

Usage Example

コード例 #1
0
ファイル: CryptoStreamTest.cs プロジェクト: runefs/Marvin
		private byte[] NonMultipleOfBlockSize_Decrypt (ICryptoTransform ct, byte[] data) 
		{
			DebugStream stream = new DebugStream (data);
			CryptoStream CryptStream = new CryptoStream (stream, ct, CryptoStreamMode.Read);

			int len = 0;
			long myLength = 0;
			byte[] Buffer = new Byte [1024];

			DebugStream fout = new DebugStream ();
			// each returned block must be 1023 bytes long 
			// even if this isn't a multiple of the block size
			while ((len = CryptStream.Read (Buffer, 0, 1023)) != 0) {
				fout.Write (Buffer, 0, len);
				fout.Flush ();
				myLength = myLength + len;
			}

			byte[] result = fout.ToArray ();
			CryptStream.Close ();
			stream.Close ();
			return result;
		}