1using System.Diagnostics.CodeAnalysis;
2using System.Formats.Asn1;
28 public System.Numerics.BigInteger
Version {
get;
private set; }
104 if ((c = SignerInfoVector.Length) < 5)
107 if (SignerInfoVector.FirstElement is not
System.Numerics.BigInteger
Version)
116 else if (SignerInfoVector[1] is Vector SignerIdentifierVector)
118 foreach (
object Item
in SignerIdentifierVector.Elements)
120 if (Item is Vector v)
122 else if (Item is
System.Numerics.BigInteger SN)
126 else if (Item is
byte[] Bin)
135 if (SignerInfoVector[2] is Vector DigestAlgorithmVector &&
136 DigestAlgorithmVector.FirstElement is
HashFunction DigestAlgorithm2)
148 byte[] SignedAttributesBinary = [];
155 SignedAttributesVector.Tag == 0)
157 SignedAttributesBinary = (
byte[])SignedAttributesVector.SubSection.Clone();
158 SignedAttributesBinary[0] = (byte)UniversalTagNumber.Set | 0x20;
161 foreach (
object Attribute in SignedAttributesVector.Elements)
184 if (SignerInfoVector[i] is Vector AlgorithmIdentifier)
199 if (SignerInfoVector[i] is not
byte[]
Signature)
201 if (SignerInfoVector[i] is Vector v)
211 UnsignedAttributesVector.Tag == 1)
213 foreach (
object Attribute
in UnsignedAttributesVector.Elements)
Abstract base class for hash functions.
byte[] Identifier
Key identifier
byte[] Value
Binary Value.
string? Value
String Value.
Abstract base class for signature algorithms, as defined in RFC 5280.
SignatureAlgorithm()
Abstract base class for signature algorithms, as defined in RFC 5280.
Signer Information, as defined in RFC 5652, §5.3.
byte[] SignedAttributesData
Binart representation of the signed attributes, as they are used in signature validation.
HashFunction? DigestAlgorithm
Digest algorithm.
byte[] Signature
Signature
static bool TryParse(Vector SignerInfoVector, [NotNullWhen(true)] out SignerInfo? Parsed)
Tries to parse an ASN.1-encoded Signer Information structure, as defined in RFC 5652,...
System.Numerics.BigInteger Version
Version of encoding
byte?[] SubjectKeyIdentifier
Signer Subject Key Identifier.
object[] UnsignedAttributes
Unsigned attributes
object[] SignedAttributes
Signed attributes
System.Numerics.? BigInteger SerialNumber
Signer serial number.
Names? Signer
Information about signed.
bool HasSignedAttributes
If there are signed attributes.
ISignatureAlgorithm? SignatureAlgorithm
Signature algorithm
A chunked list is a linked list of chunks of objects of type T .
Interface for signature algorithms, as defined in RFC 5280.
class Names(Vector NamesVector)
Contains a collection of distinguished names.
class ContextSpecific(int Tag, Array Elements, byte[] SubSection)
A context-specific object (or set of objects).