Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ WriteConstructedCerBitString()

void System.Formats.Asn1.AsnWriter.WriteConstructedCerBitString ( Asn1Tag tag,
ReadOnlySpan< byte > payload,
int unusedBitCount )
inlineprivate

Definition at line 533 of file AsnWriter.cs.

534 {
537 int offset = _offset;
538 WriteTag(tag.AsConstructed());
539 WriteLength(-1);
540 byte[] buffer = _buffer;
542 Asn1Tag primitiveBitString = Asn1Tag.PrimitiveBitString;
544 while (readOnlySpan.Length > 999)
545 {
547 WriteLength(1000);
548 _buffer[_offset] = 0;
549 _offset++;
550 destination = _buffer.AsSpan(_offset);
551 readOnlySpan.Slice(0, 999).CopyTo(destination);
552 readOnlySpan = readOnlySpan.Slice(999);
553 _offset += 999;
554 }
556 WriteLength(readOnlySpan.Length + 1);
558 _offset++;
559 destination = _buffer.AsSpan(_offset);
561 _offset += readOnlySpan.Length;
563 }
void CopyTo(KeyValuePair< TKey, TValue >[] array, int index)
void EnsureWriteCapacity(int pendingCount)
Definition AsnWriter.cs:246
static int DetermineCerBitStringTotalLength(Asn1Tag tag, int contentLength)
Definition AsnWriter.cs:525
void WriteLength(int length)
Definition AsnWriter.cs:272
void WriteTag(Asn1Tag tag)
Definition AsnWriter.cs:261

References System.Formats.Asn1.AsnWriter._buffer, System.Formats.Asn1.AsnWriter._offset, System.Formats.Asn1.Asn1Tag.AsConstructed(), System.buffer, System.Collections.Generic.Dictionary< TKey, TValue >.CopyTo(), System.destination, System.Formats.Asn1.AsnWriter.DetermineCerBitStringTotalLength(), System.Formats.Asn1.AsnWriter.EnsureWriteCapacity(), System.offset, System.Formats.Asn1.Asn1Tag.PrimitiveBitString, System.Formats.Asn1.AsnWriter.WriteEndOfContents(), System.Formats.Asn1.AsnWriter.WriteLength(), and System.Formats.Asn1.AsnWriter.WriteTag().

Referenced by System.Formats.Asn1.AsnWriter.WriteBitStringCore().