-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Closed
Labels
api-approvedAPI was approved in API review, it can be implementedAPI was approved in API review, it can be implementedarea-System.Formats.Asn1
Milestone
Description
When reading ASN.1 BER/CER/DER content from a Stream it's not currently possible to know how far ahead one needs to buffer in order to read the next item.
namespace System.Formats.Asn1
{
public static partial class AsnDecoder
{
// returns null for "indefinite length"
// (local length 0, but keep seeking until you find the "end of indefinite length" marker)
public static int? DecodeLength(
ReadOnlySpan<byte> source,
AsnEncodingRules ruleSet,
out int bytesConsumed);
public static bool TryDecodeLength(
ReadOnlySpan<byte> source,
AsnEncodingRules ruleSet,
out int? decodedLength,
out int bytesConsumed);
}
}Metadata
Metadata
Assignees
Labels
api-approvedAPI was approved in API review, it can be implementedAPI was approved in API review, it can be implementedarea-System.Formats.Asn1