254 references to UniversalTagNumber
System.Formats.Asn1 (114)
System\Formats\Asn1\Asn1Tag.Accelerators.cs (14)
11internal static readonly Asn1Tag EndOfContents = new Asn1Tag(0, (int)UniversalTagNumber.EndOfContents); 16public static readonly Asn1Tag Boolean = new Asn1Tag(0, (int)UniversalTagNumber.Boolean); 21public static readonly Asn1Tag Integer = new Asn1Tag(0, (int)UniversalTagNumber.Integer); 26public static readonly Asn1Tag PrimitiveBitString = new Asn1Tag(0, (int)UniversalTagNumber.BitString); 32new Asn1Tag(ConstructedMask, (int)UniversalTagNumber.BitString); 37public static readonly Asn1Tag PrimitiveOctetString = new Asn1Tag(0, (int)UniversalTagNumber.OctetString); 43new Asn1Tag(ConstructedMask, (int)UniversalTagNumber.OctetString); 48public static readonly Asn1Tag Null = new Asn1Tag(0, (int)UniversalTagNumber.Null); 53public static readonly Asn1Tag ObjectIdentifier = new Asn1Tag(0, (int)UniversalTagNumber.ObjectIdentifier); 58public static readonly Asn1Tag Enumerated = new Asn1Tag(0, (int)UniversalTagNumber.Enumerated); 63public static readonly Asn1Tag Sequence = new Asn1Tag(ConstructedMask, (int)UniversalTagNumber.Sequence); 68public static readonly Asn1Tag SetOf = new Asn1Tag(ConstructedMask, (int)UniversalTagNumber.SetOf); 73public static readonly Asn1Tag UtcTime = new Asn1Tag(0, (int)UniversalTagNumber.UtcTime); 78public static readonly Asn1Tag GeneralizedTime = new Asn1Tag(0, (int)UniversalTagNumber.GeneralizedTime);
System\Formats\Asn1\Asn1Tag.cs (7)
38/// be interpreted as a <see cref="UniversalTagNumber"/>. 60public Asn1Tag(UniversalTagNumber universalTagNumber, bool isConstructed = false) 64const UniversalTagNumber ReservedIndex = (UniversalTagNumber)15; 66if (universalTagNumber < UniversalTagNumber.EndOfContents || 67universalTagNumber > UniversalTagNumber.RelativeObjectIdentifierIRI || 471classAndValue = ((UniversalTagNumber)TagValue).ToString();
System\Formats\Asn1\AsnCharacterStringEncodings.cs (8)
22internal static Encoding GetEncoding(UniversalTagNumber encodingType) => 25UniversalTagNumber.UTF8String => s_utf8Encoding, 26UniversalTagNumber.NumericString => s_numericStringEncoding, 27UniversalTagNumber.PrintableString => s_printableStringEncoding, 28UniversalTagNumber.IA5String => s_ia5Encoding, 29UniversalTagNumber.VisibleString => s_visibleStringEncoding, 30UniversalTagNumber.BMPString => s_bmpEncoding, 31UniversalTagNumber.T61String => s_t61Encoding,
System\Formats\Asn1\AsnDecoder.BitString.cs (1)
644CheckExpectedTag(actualTag, expectedTag, UniversalTagNumber.BitString);
System\Formats\Asn1\AsnDecoder.Boolean.cs (1)
55UniversalTagNumber.Boolean,
System\Formats\Asn1\AsnDecoder.cs (2)
179UniversalTagNumber tagNumber, 708private static void CheckExpectedTag(Asn1Tag tag, Asn1Tag expectedTag, UniversalTagNumber tagNumber)
System\Formats\Asn1\AsnDecoder.Enumerated.cs (3)
58UniversalTagNumber.Enumerated, 199const UniversalTagNumber TagNumber = UniversalTagNumber.Enumerated;
System\Formats\Asn1\AsnDecoder.GeneralizedTime.cs (1)
65UniversalTagNumber.GeneralizedTime,
System\Formats\Asn1\AsnDecoder.Integer.cs (8)
59UniversalTagNumber.Integer, 189UniversalTagNumber.Integer, 256UniversalTagNumber.Integer, 322UniversalTagNumber.Integer, 382UniversalTagNumber.Integer, 391UniversalTagNumber tagNumber, 430UniversalTagNumber tagNumber, 469UniversalTagNumber tagNumber,
System\Formats\Asn1\AsnDecoder.NamedBitList.cs (1)
332CheckExpectedTag(actualTag, expectedTag.Value, UniversalTagNumber.BitString);
System\Formats\Asn1\AsnDecoder.Null.cs (1)
52UniversalTagNumber.Null,
System\Formats\Asn1\AsnDecoder.OctetString.cs (5)
80UniversalTagNumber.OctetString, 169UniversalTagNumber.OctetString, 188UniversalTagNumber universalTagNumber, 278UniversalTagNumber.OctetString, 480UniversalTagNumber universalTagNumber,
System\Formats\Asn1\AsnDecoder.Oid.cs (1)
61UniversalTagNumber.ObjectIdentifier,
System\Formats\Asn1\AsnDecoder.Sequence.cs (2)
64CheckExpectedTag(tag, expectedTag ?? Asn1Tag.Sequence, UniversalTagNumber.Sequence); 73UniversalTagNumber.Sequence));
System\Formats\Asn1\AsnDecoder.SetOf.cs (2)
71CheckExpectedTag(tag, expectedTag ?? Asn1Tag.SetOf, UniversalTagNumber.SetOf); 79UniversalTagNumber.SetOf));
System\Formats\Asn1\AsnDecoder.Text.cs (25)
70UniversalTagNumber universalTagNumber = UniversalTagNumber.IA5String; 74universalTagNumber = (UniversalTagNumber)expectedTag.TagValue; 163UniversalTagNumber universalTagNumber = UniversalTagNumber.IA5String; 167universalTagNumber = (UniversalTagNumber)expectedTag.TagValue; 246UniversalTagNumber encodingType, 318UniversalTagNumber encodingType, 338UniversalTagNumber universalTagNumber, 432UniversalTagNumber universalTagNumber, 484UniversalTagNumber universalTagNumber, 524private static bool IsCharacterStringEncodingType(UniversalTagNumber encodingType) 529case UniversalTagNumber.BMPString: 530case UniversalTagNumber.GeneralString: 531case UniversalTagNumber.GraphicString: 532case UniversalTagNumber.IA5String: 533case UniversalTagNumber.ISO646String: 534case UniversalTagNumber.NumericString: 535case UniversalTagNumber.PrintableString: 536case UniversalTagNumber.TeletexString: 538case UniversalTagNumber.UniversalString: 539case UniversalTagNumber.UTF8String: 540case UniversalTagNumber.VideotexString: 716UniversalTagNumber encodingType, 774public string ReadCharacterString(UniversalTagNumber encodingType, Asn1Tag? expectedTag = null)
System\Formats\Asn1\AsnDecoder.UtcTime.cs (1)
90UniversalTagNumber.UtcTime,
System\Formats\Asn1\AsnWriter.BitString.cs (1)
38CheckUniversalTag(tag, UniversalTagNumber.BitString);
System\Formats\Asn1\AsnWriter.Boolean.cs (1)
23CheckUniversalTag(tag, UniversalTagNumber.Boolean);
System\Formats\Asn1\AsnWriter.Enumerated.cs (1)
75CheckUniversalTag(tag, UniversalTagNumber.Enumerated);
System\Formats\Asn1\AsnWriter.GeneralizedTime.cs (1)
33CheckUniversalTag(tag, UniversalTagNumber.GeneralizedTime);
System\Formats\Asn1\AsnWriter.Integer.cs (5)
25CheckUniversalTag(tag, UniversalTagNumber.Integer); 44CheckUniversalTag(tag, UniversalTagNumber.Integer); 62CheckUniversalTag(tag, UniversalTagNumber.Integer); 87CheckUniversalTag(tag, UniversalTagNumber.Integer); 108CheckUniversalTag(tag, UniversalTagNumber.Integer);
System\Formats\Asn1\AsnWriter.NamedBitList.cs (3)
42CheckUniversalTag(tag, UniversalTagNumber.BitString); 72CheckUniversalTag(tag, UniversalTagNumber.BitString); 104CheckUniversalTag(tag, UniversalTagNumber.BitString);
System\Formats\Asn1\AsnWriter.Null.cs (1)
22CheckUniversalTag(tag, UniversalTagNumber.Null);
System\Formats\Asn1\AsnWriter.OctetString.cs (5)
29CheckUniversalTag(tag, UniversalTagNumber.OctetString); 33UniversalTagNumber.OctetString); 58CheckUniversalTag(tag, UniversalTagNumber.OctetString); 59PopTag(tag?.AsConstructed() ?? Asn1Tag.ConstructedOctetString, UniversalTagNumber.OctetString); 75CheckUniversalTag(tag, UniversalTagNumber.OctetString);
System\Formats\Asn1\AsnWriter.Oid.cs (1)
60CheckUniversalTag(tag, UniversalTagNumber.ObjectIdentifier);
System\Formats\Asn1\AsnWriter.Sequence.cs (4)
26CheckUniversalTag(tag, UniversalTagNumber.Sequence); 50CheckUniversalTag(tag, UniversalTagNumber.Sequence); 60return PushTag(tag, UniversalTagNumber.Sequence); 67PopTag(tag, UniversalTagNumber.Sequence);
System\Formats\Asn1\AsnWriter.SetOf.cs (4)
30CheckUniversalTag(tag, UniversalTagNumber.SetOf); 57CheckUniversalTag(tag, UniversalTagNumber.SetOf); 69return PushTag(tag, UniversalTagNumber.SetOf); 80PopTag(tag, UniversalTagNumber.SetOf, sortContents);
System\Formats\Asn1\AsnWriter.Text.cs (2)
39public void WriteCharacterString(UniversalTagNumber encodingType, string value, Asn1Tag? tag = null) 75public void WriteCharacterString(UniversalTagNumber encodingType, ReadOnlySpan<char> str, Asn1Tag? tag = null)
System\Formats\Asn1\AsnWriter.UtcTime.cs (2)
28CheckUniversalTag(tag, UniversalTagNumber.UtcTime); 59CheckUniversalTag(tag, UniversalTagNumber.UtcTime);
System.Net.Security (1)
src\libraries\Common\src\System\Security\Cryptography\Asn1Reader\AsnValueReader.cs (1)
206internal string ReadCharacterString(UniversalTagNumber encodingType, Asn1Tag? expectedTag = default)
System.Security.Cryptography (106)
src\libraries\Common\src\System\Security\Cryptography\Asn1\DirectoryStringAsn.xml.cs (19)
34ensureUniqueTag(new Asn1Tag(UniversalTagNumber.T61String), "TeletexString"); 35ensureUniqueTag(new Asn1Tag(UniversalTagNumber.PrintableString), "PrintableString"); 36ensureUniqueTag(new Asn1Tag((UniversalTagNumber)28), "UniversalString"); 37ensureUniqueTag(new Asn1Tag(UniversalTagNumber.UTF8String), "Utf8String"); 38ensureUniqueTag(new Asn1Tag(UniversalTagNumber.BMPString), "BmpString"); 51writer.WriteCharacterString(UniversalTagNumber.T61String, TeletexString); 60writer.WriteCharacterString(UniversalTagNumber.PrintableString, PrintableString); 72!validateTag.HasSameClassAndValue(new Asn1Tag((UniversalTagNumber)28))) 94writer.WriteCharacterString(UniversalTagNumber.UTF8String, Utf8String); 103writer.WriteCharacterString(UniversalTagNumber.BMPString, BmpString); 149if (tag.HasSameClassAndValue(new Asn1Tag(UniversalTagNumber.T61String))) 151decoded.TeletexString = reader.ReadCharacterString(UniversalTagNumber.T61String); 153else if (tag.HasSameClassAndValue(new Asn1Tag(UniversalTagNumber.PrintableString))) 155decoded.PrintableString = reader.ReadCharacterString(UniversalTagNumber.PrintableString); 157else if (tag.HasSameClassAndValue(new Asn1Tag((UniversalTagNumber)28))) 162else if (tag.HasSameClassAndValue(new Asn1Tag(UniversalTagNumber.UTF8String))) 164decoded.Utf8String = reader.ReadCharacterString(UniversalTagNumber.UTF8String); 166else if (tag.HasSameClassAndValue(new Asn1Tag(UniversalTagNumber.BMPString))) 168decoded.BmpString = reader.ReadCharacterString(UniversalTagNumber.BMPString);
src\libraries\Common\src\System\Security\Cryptography\Asn1\GeneralNameAsn.xml.cs (6)
68writer.WriteCharacterString(UniversalTagNumber.IA5String, Rfc822Name, new Asn1Tag(TagClass.ContextSpecific, 1)); 77writer.WriteCharacterString(UniversalTagNumber.IA5String, DnsName, new Asn1Tag(TagClass.ContextSpecific, 2)); 138writer.WriteCharacterString(UniversalTagNumber.IA5String, Uri, new Asn1Tag(TagClass.ContextSpecific, 6)); 219decoded.Rfc822Name = reader.ReadCharacterString(UniversalTagNumber.IA5String, new Asn1Tag(TagClass.ContextSpecific, 1)); 223decoded.DnsName = reader.ReadCharacterString(UniversalTagNumber.IA5String, new Asn1Tag(TagClass.ContextSpecific, 2)); 246decoded.Uri = reader.ReadCharacterString(UniversalTagNumber.IA5String, new Asn1Tag(TagClass.ContextSpecific, 6));
src\libraries\Common\src\System\Security\Cryptography\Asn1Reader\AsnValueReader.cs (1)
206internal string ReadCharacterString(UniversalTagNumber encodingType, Asn1Tag? expectedTag = default)
src\libraries\Common\src\System\Security\Cryptography\Oids.Shared.cs (1)
121expected.TagValue == (int)UniversalTagNumber.ObjectIdentifier,
System\Security\Cryptography\Helpers.cs (6)
285switch ((UniversalTagNumber)tag.TagValue) 287case UniversalTagNumber.External: 288case UniversalTagNumber.Embedded: 289case UniversalTagNumber.Sequence: 290case UniversalTagNumber.Set: 291case UniversalTagNumber.UnrestrictedCharacterString:
System\Security\Cryptography\X509Certificates\Asn1\CertificationRequestInfoAsn.xml.cs (2)
33!validateTag.HasSameClassAndValue(new Asn1Tag((UniversalTagNumber)16))) 107if (!sequenceReader.PeekTag().HasSameClassAndValue(new Asn1Tag((UniversalTagNumber)16)))
System\Security\Cryptography\X509Certificates\Asn1\TbsCertificateAsn.xml.cs (4)
74!validateTag.HasSameClassAndValue(new Asn1Tag((UniversalTagNumber)16))) 92!validateTag.HasSameClassAndValue(new Asn1Tag((UniversalTagNumber)16))) 212if (!sequenceReader.PeekTag().HasSameClassAndValue(new Asn1Tag((UniversalTagNumber)16))) 220if (!sequenceReader.PeekTag().HasSameClassAndValue(new Asn1Tag((UniversalTagNumber)16)))
System\Security\Cryptography\X509Certificates\CertificateRevocationListBuilder.CdpExtension.cs (1)
90UniversalTagNumber.IA5String,
System\Security\Cryptography\X509Certificates\SubjectAlternativeNameBuilder.cs (1)
56writer.WriteCharacterString(UniversalTagNumber.UTF8String, upn);
System\Security\Cryptography\X509Certificates\UnixExportProvider.cs (1)
196attrBytes[0] = (byte)UniversalTagNumber.OctetString;
System\Security\Cryptography\X509Certificates\X500DirectoryStringHelper.cs (16)
19switch ((UniversalTagNumber)tag.TagValue) 21case UniversalTagNumber.BMPString: 22case UniversalTagNumber.IA5String: 23case UniversalTagNumber.NumericString: 24case UniversalTagNumber.PrintableString: 25case UniversalTagNumber.UTF8String: 26case UniversalTagNumber.T61String: 30return tavReader.ReadCharacterString((UniversalTagNumber)tag.TagValue).TrimEnd('\0'); 46switch ((UniversalTagNumber)tag.TagValue) 48case UniversalTagNumber.BMPString: 49case UniversalTagNumber.IA5String: 50case UniversalTagNumber.NumericString: 51case UniversalTagNumber.PrintableString: 52case UniversalTagNumber.UTF8String: 53case UniversalTagNumber.T61String: 57return tavReader.ReadCharacterString((UniversalTagNumber)tag.TagValue).TrimEnd('\0');
System\Security\Cryptography\X509Certificates\X500DistinguishedNameBuilder.cs (23)
62public void Add(string oidValue, string value, UniversalTagNumber? stringEncodingType = null) 67UniversalTagNumber tag = GetAndValidateTagNumber(stringEncodingType); 96public void Add(Oid oid, string value, UniversalTagNumber? stringEncodingType = null) 102UniversalTagNumber tag = GetAndValidateTagNumber(stringEncodingType); 140EncodeComponent(Oids.EmailAddress, emailAddress, UniversalTagNumber.IA5String); 163EncodeComponent(Oids.CommonName, commonName, UniversalTagNumber.UTF8String); 186EncodeComponent(Oids.LocalityName, localityName, UniversalTagNumber.UTF8String); 236UniversalTagNumber.PrintableString, 260EncodeComponent(Oids.Organization, organizationName, UniversalTagNumber.UTF8String); 283EncodeComponent(Oids.OrganizationalUnit, organizationalUnitName, UniversalTagNumber.UTF8String); 306EncodeComponent(Oids.StateOrProvinceName, stateOrProvinceName, UniversalTagNumber.UTF8String); 332EncodeComponent(Oids.DomainComponent, domainComponent, UniversalTagNumber.IA5String); 359UniversalTagNumber stringEncodingType, 382private static UniversalTagNumber GetAndValidateTagNumber(UniversalTagNumber? stringEncodingType) 387return UniversalTagNumber.UTF8String; 388case UniversalTagNumber.UTF8String: 389case UniversalTagNumber.NumericString: 390case UniversalTagNumber.PrintableString: 391case UniversalTagNumber.IA5String: 392case UniversalTagNumber.VisibleString: 393case UniversalTagNumber.BMPString: 394case UniversalTagNumber.T61String:
System\Security\Cryptography\X509Certificates\X500NameEncoder.cs (8)
528WriteCryptoCharacterString(writer, UniversalTagNumber.IA5String, data); 532WriteCryptoCharacterString(writer, UniversalTagNumber.UTF8String, data); 535WriteCryptoCharacterString(writer, UniversalTagNumber.NumericString, data); 538WriteCryptoCharacterString(writer, UniversalTagNumber.PrintableString, data); 544writer.WriteCharacterString(UniversalTagNumber.PrintableString, data); 548WriteCryptoCharacterString(writer, UniversalTagNumber.UTF8String, data); 645private static void WriteCryptoCharacterString(AsnWriter writer, UniversalTagNumber tagNumber, ReadOnlySpan<char> data) 653if (tagNumber == UniversalTagNumber.IA5String)
System\Security\Cryptography\X509Certificates\X500NameEncoder.ManagedDecode.cs (9)
157switch ((UniversalTagNumber)tag.TagValue) 159case UniversalTagNumber.BMPString: 160case UniversalTagNumber.IA5String: 161case UniversalTagNumber.NumericString: 162case UniversalTagNumber.PrintableString: 163case UniversalTagNumber.UTF8String: 164case UniversalTagNumber.T61String: 169return tavReader.ReadCharacterString((UniversalTagNumber)tag.TagValue).TrimEnd('\0'); 170case UniversalTagNumber.OctetString:
System\Security\Cryptography\X509Certificates\X500RelativeDistinguishedName.cs (7)
135switch ((UniversalTagNumber)tag.TagValue) 137case UniversalTagNumber.BMPString: 138case UniversalTagNumber.UTF8String: 139case UniversalTagNumber.IA5String: 140case UniversalTagNumber.PrintableString: 141case UniversalTagNumber.NumericString: 142case UniversalTagNumber.T61String:
System\Security\Cryptography\X509Certificates\X509AuthorityInformationAccessExtension.cs (1)
294UniversalTagNumber.IA5String,
System.Security.Cryptography.Pkcs (33)
src\libraries\Common\src\System\Security\Cryptography\Asn1\DirectoryStringAsn.xml.cs (19)
34ensureUniqueTag(new Asn1Tag(UniversalTagNumber.T61String), "TeletexString"); 35ensureUniqueTag(new Asn1Tag(UniversalTagNumber.PrintableString), "PrintableString"); 36ensureUniqueTag(new Asn1Tag((UniversalTagNumber)28), "UniversalString"); 37ensureUniqueTag(new Asn1Tag(UniversalTagNumber.UTF8String), "Utf8String"); 38ensureUniqueTag(new Asn1Tag(UniversalTagNumber.BMPString), "BmpString"); 51writer.WriteCharacterString(UniversalTagNumber.T61String, TeletexString); 60writer.WriteCharacterString(UniversalTagNumber.PrintableString, PrintableString); 72!validateTag.HasSameClassAndValue(new Asn1Tag((UniversalTagNumber)28))) 94writer.WriteCharacterString(UniversalTagNumber.UTF8String, Utf8String); 103writer.WriteCharacterString(UniversalTagNumber.BMPString, BmpString); 149if (tag.HasSameClassAndValue(new Asn1Tag(UniversalTagNumber.T61String))) 151decoded.TeletexString = reader.ReadCharacterString(UniversalTagNumber.T61String); 153else if (tag.HasSameClassAndValue(new Asn1Tag(UniversalTagNumber.PrintableString))) 155decoded.PrintableString = reader.ReadCharacterString(UniversalTagNumber.PrintableString); 157else if (tag.HasSameClassAndValue(new Asn1Tag((UniversalTagNumber)28))) 162else if (tag.HasSameClassAndValue(new Asn1Tag(UniversalTagNumber.UTF8String))) 164decoded.Utf8String = reader.ReadCharacterString(UniversalTagNumber.UTF8String); 166else if (tag.HasSameClassAndValue(new Asn1Tag(UniversalTagNumber.BMPString))) 168decoded.BmpString = reader.ReadCharacterString(UniversalTagNumber.BMPString);
src\libraries\Common\src\System\Security\Cryptography\Asn1\GeneralNameAsn.xml.cs (6)
68writer.WriteCharacterString(UniversalTagNumber.IA5String, Rfc822Name, new Asn1Tag(TagClass.ContextSpecific, 1)); 77writer.WriteCharacterString(UniversalTagNumber.IA5String, DnsName, new Asn1Tag(TagClass.ContextSpecific, 2)); 138writer.WriteCharacterString(UniversalTagNumber.IA5String, Uri, new Asn1Tag(TagClass.ContextSpecific, 6)); 219decoded.Rfc822Name = reader.ReadCharacterString(UniversalTagNumber.IA5String, new Asn1Tag(TagClass.ContextSpecific, 1)); 223decoded.DnsName = reader.ReadCharacterString(UniversalTagNumber.IA5String, new Asn1Tag(TagClass.ContextSpecific, 2)); 246decoded.Uri = reader.ReadCharacterString(UniversalTagNumber.IA5String, new Asn1Tag(TagClass.ContextSpecific, 6));
src\libraries\Common\src\System\Security\Cryptography\Asn1Reader\AsnValueReader.cs (1)
206internal string ReadCharacterString(UniversalTagNumber encodingType, Asn1Tag? expectedTag = default)
src\libraries\Common\src\System\Security\Cryptography\Oids.Shared.cs (1)
121expected.TagValue == (int)UniversalTagNumber.ObjectIdentifier,
System\Security\Cryptography\Pkcs\Asn1\CertificateChoiceAsn.xml.cs (3)
34ensureUniqueTag(new Asn1Tag((UniversalTagNumber)16), "Certificate"); 54!validateTag.HasSameClassAndValue(new Asn1Tag((UniversalTagNumber)16))) 197if (tag.HasSameClassAndValue(new Asn1Tag((UniversalTagNumber)16)))
System\Security\Cryptography\Pkcs\Asn1\IssuerAndSerialNumberAsn.xml.cs (2)
29!validateTag.HasSameClassAndValue(new Asn1Tag((UniversalTagNumber)16))) 93if (!sequenceReader.PeekTag().HasSameClassAndValue(new Asn1Tag((UniversalTagNumber)16)))
System\Security\Cryptography\Pkcs\Asn1\PkiStatusInfo.xml.cs (1)
34!validateTag.HasSameClassAndValue(new Asn1Tag((UniversalTagNumber)16)))