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

◆ WriteIntegerCore() [3/3]

void System.Formats.Asn1.AsnWriter.WriteIntegerCore ( Asn1Tag tag,
ReadOnlySpan< byte > value )
inlineprivate

Definition at line 760 of file AsnWriter.cs.

761 {
762 if (value.IsEmpty)
763 {
765 }
766 if (value.Length > 1)
767 {
768 ushort num = (ushort)((value[0] << 8) | value[1]);
769 ushort num2 = (ushort)(num & 0xFF80u);
770 if (num2 == 0 || num2 == 65408)
771 {
773 }
774 }
775 WriteTag(tag);
776 WriteLength(value.Length);
777 value.CopyTo(_buffer.AsSpan(_offset));
778 _offset += value.Length;
779 }
void WriteLength(int length)
Definition AsnWriter.cs:272
void WriteTag(Asn1Tag tag)
Definition AsnWriter.cs:261
static string Argument_IntegerRedundantByte
Definition SR.cs:30
static string Argument_IntegerCannotBeEmpty
Definition SR.cs:28
Definition SR.cs:7

References System.Formats.Asn1.AsnWriter._buffer, System.Formats.Asn1.AsnWriter._offset, System.SR.Argument_IntegerCannotBeEmpty, System.SR.Argument_IntegerRedundantByte, System.value, System.Formats.Asn1.AsnWriter.WriteLength(), and System.Formats.Asn1.AsnWriter.WriteTag().