3using System.Globalization;
5using System.Threading.Tasks;
45 switch (FileExtension.ToLower(CultureInfo.InvariantCulture))
52 ContentType =
string.Empty;
65 switch (ContentType.ToLower(CultureInfo.InvariantCulture))
72 FileExtension =
string.Empty;
85 if (
string.Equals(ContentType,
DefaultContentType, StringComparison.OrdinalIgnoreCase))
107 public Task<ContentResponse>
DecodeAsync(
string ContentType,
byte[] Data, Encoding Encoding, KeyValuePair<string, string>[] Fields, Uri BaseUri,
ICodecProgress Progress)
110 Decoded is not Vector Crl ||
113 return Task.FromResult(
new ContentResponse(
new Exception(
"Unable to parse and decode CRL data.")));
Static class for parsing and decoding security objects encoded using Abstract Syntax Notation 1 (ASN....
static bool TryDecodeDer(byte[] Data, out object? Value)
Decodes a DER-encoded object.
Certificate List, as defined in RFC 5280, §5.1
static bool TryParse(byte[] RawCertificateList, [NotNullWhen(true)] out CertificateList? Parsed)
Tries to parse an ASN.1-encoded Certificate List, as defined in RFC 5280, §5.1.
Decodes Certificate Revocation Lists.
Task< ContentResponse > DecodeAsync(string ContentType, byte[] Data, Encoding Encoding, KeyValuePair< string, string >[] Fields, Uri BaseUri, ICodecProgress Progress)
Decodes an object.
bool TryGetContentType(string FileExtension, out string ContentType)
Tries to get the content type of an item, given its file extension.
bool TryGetFileExtension(string ContentType, out string FileExtension)
Tries to get the file extension of an item, given its Content-Type.
const string DefaultFileExtension
Default file extension for CRL files.
string[] ContentTypes
Supported content types.
bool Decodes(string ContentType, out Grade Grade)
If the decoder decodes an object with a given content type.
const string DefaultContentType
Internet Content-Type for Certificate Revocation Lists.
string[] FileExtensions
Supported file extensions.
Contains information about a response to a content request.
Interface for reporting progress about an encoding or decoding.
Basic interface for Internet Content decoders. A class implementing this interface and having a defau...