Org.BouncyCastle.OpenSsl.PemWriter.WriteBytes C# (CSharp) Method

WriteBytes() private method

private WriteBytes ( byte bytes ) : void
bytes byte
return void
		private void WriteBytes(
			byte[] bytes)
		{
			int pos = 0;
			int remaining = bytes.Length;
			char[] buf = new char[LineLength];

			while (remaining > LineLength)
			{
				Encoding.ASCII.GetChars(bytes, pos, LineLength, buf, 0);
				writer.WriteLine(buf);

				pos += LineLength;
				remaining -= LineLength;
			}

			Encoding.ASCII.GetChars(bytes, pos, remaining, buf, 0);
			writer.WriteLine(buf, 0, remaining);
		}
	}