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