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

◆ TryReadOctetString()

static bool System.Formats.Asn1.AsnDecoder.TryReadOctetString ( ReadOnlySpan< byte > source,
Span< byte > destination,
AsnEncodingRules ruleSet,
out int bytesConsumed,
out int bytesWritten,
Asn1Tag? expectedTag = null )
inlinestatic

Definition at line 1188 of file AsnDecoder.cs.

1189 {
1190 if (source.Overlaps(destination))
1191 {
1193 }
1195 {
1196 if (contents.Length > destination.Length)
1197 {
1198 bytesWritten = 0;
1199 bytesConsumed = 0;
1200 return false;
1201 }
1202 contents.CopyTo(destination);
1203 bytesWritten = contents.Length;
1205 return true;
1206 }
1207 int bytesRead;
1209 if (flag)
1210 {
1212 }
1213 else
1214 {
1215 bytesConsumed = 0;
1216 }
1217 return flag;
1218 }
void CopyTo(KeyValuePair< TKey, TValue >[] array, int index)
static bool TryCopyConstructedOctetStringContents(ReadOnlySpan< byte > source, AsnEncodingRules ruleSet, Span< byte > dest, bool isIndefinite, out int bytesRead, out int bytesWritten)
static ReadOnlySpan< byte > Slice(ReadOnlySpan< byte > source, int offset, int length)
static bool TryReadPrimitiveOctetStringCore(ReadOnlySpan< byte > source, AsnEncodingRules ruleSet, Asn1Tag expectedTag, UniversalTagNumber universalTagNumber, out int? contentLength, out int headerLength, out ReadOnlySpan< byte > contents, out int bytesConsumed)
static string Argument_SourceOverlapsDestination
Definition SR.cs:24
Definition SR.cs:7

References System.SR.Argument_SourceOverlapsDestination, System.Collections.Generic.Dictionary< TKey, TValue >.CopyTo(), System.destination, System.Formats.Asn1.Asn1Tag.PrimitiveOctetString, System.Formats.Asn1.AsnDecoder.Slice(), System.source, System.Formats.Asn1.AsnDecoder.TryCopyConstructedOctetStringContents(), and System.Formats.Asn1.AsnDecoder.TryReadPrimitiveOctetStringCore().

Referenced by System.Security.Cryptography.PasswordBasedEncryption.ReadIvParameter(), and System.Formats.Asn1.AsnReader.TryReadOctetString().