1 write to _buffer
System.Formats.Asn1 (1)
System\Formats\Asn1\AsnWriter.cs (1)
75_buffer = new byte[initialCapacity];
36 references to _buffer
System.Formats.Asn1 (36)
System\Formats\Asn1\AsnWriter.BitString.cs (8)
91_buffer[_offset] = (byte)unusedBitCount; 93bitString.CopyTo(_buffer.AsSpan(_offset)); 158byte[] ensureNoExtraCopy = _buffer; 170_buffer[_offset] = 0; 173dest = _buffer.AsSpan(_offset); 183_buffer[_offset] = (byte)unusedBitCount; 186dest = _buffer.AsSpan(_offset); 193Debug.Assert(_buffer == ensureNoExtraCopy, $"_buffer was replaced during {nameof(WriteConstructedCerBitString)}");
System\Formats\Asn1\AsnWriter.Boolean.cs (2)
35Debug.Assert(_offset < _buffer.Length); 36_buffer[_offset] = (byte)(value ? 0xFF : 0x00);
System\Formats\Asn1\AsnWriter.cs (4)
93Debug.Assert(_buffer != null); 94Array.Clear(_buffer, 0, _offset); 157_buffer.AsSpan(0, _offset).CopyTo(destination); 209return _buffer.AsSpan(0, _offset).ToArray();
System\Formats\Asn1\AsnWriter.GeneralizedTime.cs (2)
121Span<byte> baseSpan = _buffer.AsSpan(_offset); 140_buffer[_offset] = (byte)'Z';
System\Formats\Asn1\AsnWriter.Integer.cs (10)
150_buffer[idx] = (byte)remaining; 160Debug.Assert(_buffer[_offset] != 0xFF || _buffer[_offset + 1] < 0x80); 202_buffer[idx] = (byte)remaining; 212Debug.Assert(_buffer[_offset] != 0 || _buffer[_offset + 1] > 0x7F); 238_buffer[_offset] = 0; 246value.CopyTo(_buffer.AsSpan(_offset)); 274value.CopyTo(_buffer.AsSpan(_offset)); 287value.TryWriteBytes(_buffer.AsSpan(_offset), out int bytesWritten, isBigEndian: true);
System\Formats\Asn1\AsnWriter.OctetString.cs (5)
98octetString.CopyTo(_buffer.AsSpan(_offset)); 137byte[] ensureNoExtraCopy = _buffer; 150dest = _buffer.AsSpan(_offset); 159dest = _buffer.AsSpan(_offset); 166Debug.Assert(_buffer == ensureNoExtraCopy, $"_buffer was replaced during {nameof(WriteConstructedCerOctetString)}");
System\Formats\Asn1\AsnWriter.Oid.cs (2)
69wellKnownContents.CopyTo(_buffer.AsSpan(_offset)); 141Buffer.BlockCopy(tmp, 0, _buffer, _offset, tmpOffset);
System\Formats\Asn1\AsnWriter.Text.cs (1)
102Span<byte> dest = _buffer.AsSpan(_offset, size);
System\Formats\Asn1\AsnWriter.UtcTime.cs (2)
98Span<byte> baseSpan = _buffer.AsSpan(_offset); 112_buffer[_offset + 12] = (byte)'Z';