System.Formats.Asn1 This type represents an ASN.1 tag, as described in ITU-T Recommendation X.680. Represents the universal class tag for a Boolean value. Represents the universal class tag for a Bit String value under a constructed encoding. Represents the universal class tag for a Octet String value under a constructed encoding. Represents the universal class tag for an Enumerated value. Represents the universal class tag for a GeneralizedTime value. Represents the universal class tag for an Integer value. Represents the universal class tag for a value. Represents the universal class tag for an Object Identifier value. Represents the universal class tag for a Bit String value under a primitive encoding. Represents the universal class tag for an Octet String value under a primitive encoding. Represents the universal class tag for a Sequence value (always a constructed encoding). Represents the universal class tag for a SetOf value (always a constructed encoding). Represents the universal class tag for a UtcTime value. Create an for a specified value within a specified tag class. The tag class for this tag. The numeric value for this tag. for a constructed tag, for a primitive tag. is not a known value. -or- is negative. Create an for a tag from the UNIVERSAL class. One of the enumeration values that specifies the semantic type for this tag. for a constructed tag, for a primitive tag. is not a known value. Produces a tag with the same and values, but whose is . A tag with the same and values, but whose is . Produces a tag with the same and values, but whose is . A tag with the same and values, but whose is . Reports the number of bytes required for the BER-encoding of this tag. The number of bytes required for the BER-encoding of this tag. Reads a BER-encoded tag which starts at . The read only byte sequence whose beginning is a BER-encoded tag. When this method returns, contains the number of bytes that contributed to the encoded tag. This parameter is treated as uninitialized. The provided data does not decode to a tag. The decoded tag. Writes the BER-encoded form of this tag to . The start of where the encoded tag should be written. . < . The number of bytes written to . Tests if has the same encoding as this tag. Tag to test for equality. if has the same values for , , and ; otherwise. Tests if is an with the same encoding as this tag. Object to test for value equality. if is not an , otherwise. Returns the hash code for this instance. A 32-bit signed integer hash code. Tests if has the same and values as this tag, and does not compare . Tag to test for concept equality. if has the same and as this tag, otherwise. Tests if two values have the same BER encoding. The first value to compare. The second value to compare. if and have the same BER encoding, otherwise. Tests if two values have a different BER encoding. The first value to compare. The second value to compare. if and have a different BER encoding, otherwise. Provides a text representation of this tag suitable for debugging. A text representation of this tag suitable for debugging. Attempts to read a BER-encoded tag which starts at . The read only byte sequence whose beginning is a BER-encoded tag. The decoded tag. When this method returns, contains the number of bytes that contributed to the encoded tag, 0 on failure. This parameter is treated as uninitialized. if a tag was correctly decoded; otherwise, . Attempts to write the BER-encoded form of this tag to . The start of where the encoded tag should be written. Receives the value from on success, 0 on failure. if . < (), otherwise. Indicates if the tag represents a constructed encoding (), or a primitive encoding (). The tag class to which this tag belongs. The numeric value for this tag. The exception that is thrown when an encoded ASN.1 value cannot be successfully decoded. Initializes a new instance of the class, using the default message. Initializes a new instance of the class with serialized data. The object that holds the serialized object data. The contextual information about the source or destination. Initializes a new instance of the class, using the provided message. The error message that explains the reason for the exception. Initializes a new instance of the class, using the provided message and exception that is the cause of this exception. The error message that explains the reason for the exception. The exception that is the cause of the current exception. Provides stateless methods for decoding BER-encoded, CER-encoded, and DER-encoded ASN.1 data. Reads a Bit String value from with a specified tag under the specified encoding rules, returning the contents in a new array. The buffer containing encoded data. The encoding constraints to use when interpreting the data. On success, receives the number of bits in the last byte which were reported as "unused" by the writer. This parameter is treated as uninitialized. When this method returns, the total number of bytes for the encoded value. This parameter is treated as uninitialized. The tag to check for before reading, or for the default tag (Universal 3). is not defined. The next value does not have the correct tag. -or- The length encoding is not valid under the current encoding rules. -or- The contents are not valid under the current encoding rules. . is , but . is not correct for the method. An array containing the contents of the Bit String value. Reads a Boolean value from with a specified tag under the specified encoding rules. The buffer containing encoded data. The encoding constraints to use when interpreting the data. When this method returns, the total number of bytes for the encoded value. This parameter is treated as uninitialized. The tag to check for before reading, or for the default tag (Universal 1). is not defined. The next value does not have the correct tag. -or- The length encoding is not valid under the current encoding rules. -or- The contents are not valid under the current encoding rules. . is , but . is not correct for the method. The decoded value. Reads the next value as character string with the specified tag and encoding type, returning the decoded string. The buffer containing encoded data. The encoding constraints to use when interpreting the data. One of the enumeration values which represents the value type to process. When this method returns, the total number of bytes for the encoded value. This parameter is treated as uninitialized. The tag to check for before reading, or for the universal tag that is appropriate to the requested encoding type. is not defined. -or- is not a known character string type. The next value does not have the correct tag. -or- The length encoding is not valid under the current encoding rules. -or- The contents are not valid under the current encoding rules. -or- The string did not successfully decode. . is , but . is not the same as . The decoded value. Locates the contents range for the encoded value at the beginning of the buffer using the specified encoding rules. The buffer containing encoded data. The encoding constraints to use when interpreting the data. When this method returns, the offset of the content payload relative to the start of . This parameter is treated as uninitialized. When this method returns, the number of bytes in the content payload (which may be 0). This parameter is treated as uninitialized. When this method returns, the total number of bytes for the encoded value. This parameter is treated as uninitialized. is not defined. does not represent a value encoded under the specified encoding rules. The tag identifying the content. Reads an Enumerated value from with a specified tag under the specified encoding rules, returning the contents as a slice of the buffer. The buffer containing encoded data. The encoding constraints to use when interpreting the data. When this method returns, the total number of bytes for the encoded value. This parameter is treated as uninitialized. The tag to check for before reading, or for the default tag (Universal 10). is not defined. The next value does not have the correct tag. -or- The length encoding is not valid under the current encoding rules. -or- The contents are not valid under the current encoding rules. . is , but . is not correct for the method. The slice of the buffer containing the bytes of the Enumerated value, in signed big-endian form. Reads an Enumerated from with a specified tag under the specified encoding rules, converting it to the non-[] enum specified by . The buffer containing encoded data. The encoding constraints to use when interpreting the data. Type object representing the destination type. When this method returns, the total number of bytes for the encoded value. This parameter is treated as uninitialized. The tag to check for before reading, or for the default tag (Universal 10). The next value does not have the correct tag. -or- The length encoding is not valid under the current encoding rules. -or- The contents are not valid under the current encoding rules. -or- The encoded value is too big to fit in a value. is not an enum type. -or- was declared with . -or- . is , but . is not correct for the method. is . The Enumerated value converted to a . Reads an Enumerated from with a specified tag under the specified encoding rules, converting it to the non-[] enum specified by . The buffer containing encoded data. The encoding constraints to use when interpreting the data. When this method returns, the total number of bytes for the encoded value. This parameter is treated as uninitialized. The tag to check for before reading, or for the default tag (Universal 10). Destination enum type. is not defined. The next value does not have the correct tag. -or- The length encoding is not valid under the current encoding rules. -or- The contents are not valid under the current encoding rules. -or- The encoded value is too big to fit in a value. is not an enum type. -or- was declared with . -or- . is , but . is not correct for the method. The Enumerated value converted to a . Reads a GeneralizedTime value from with a specified tag under the specified encoding rules. The buffer containing encoded data. The encoding constraints to use when interpreting the data. When this method returns, the total number of bytes for the encoded value. This parameter is treated as uninitialized. The tag to check for before reading, or for the default tag (Universal 24). is not defined. The next value does not have the correct tag. -or- The length encoding is not valid under the current encoding rules. -or- The contents are not valid under the current encoding rules. . is , but . is not correct for the method. The decoded value. Reads an Integer value from with a specified tag under the specified encoding rules. The buffer containing encoded data. The encoding constraints to use when interpreting the data. When this method returns, the total number of bytes for the encoded value. This parameter is treated as uninitialized. The tag to check for before reading, or for the default tag (Universal 2). is not defined. The next value does not have the correct tag. -or- The length encoding is not valid under the current encoding rules. -or- The contents are not valid under the current encoding rules. . is , but . is not correct for the method. The decoded numeric value. Reads an Integer value from with a specified tag under the specified encoding rules, returning the contents as a slice of the buffer. The buffer containing encoded data. The encoding constraints to use when interpreting the data. When this method returns, the total number of bytes for the encoded value. This parameter is treated as uninitialized. The tag to check for before reading, or for the default tag (Universal 2). is not defined. The next value does not have the correct tag. -or- The length encoding is not valid under the current encoding rules. -or- The contents are not valid under the current encoding rules. . is , but . is not correct for the method. The slice of the buffer containing the bytes of the Integer value, in signed big-endian form. Reads a NamedBitList from with a specified tag under the specified encoding rules. The buffer containing encoded data. The encoding constraints to use when interpreting the data. When this method returns, the total number of bytes for the encoded value. This parameter is treated as uninitialized. The tag to check for before reading, or for the default tag (Universal 3). is not defined. The next value does not have the correct tag. -or- The length encoding is not valid under the current encoding rules. -or- The contents are not valid under the current encoding rules. . is , but . is not correct for the method. The bits from the encoded value. Reads a NamedBitList from with a specified tag under the specified encoding rules, converting it to the [] enum specified by . The buffer containing encoded data. The encoding constraints to use when interpreting the data. Type object representing the destination type. When this method returns, the total number of bytes for the encoded value. This parameter is treated as uninitialized. The tag to check for before reading, or for the default tag (Universal 3). is not defined. The next value does not have the correct tag. -or- The length encoding is not valid under the current encoding rules. -or- The contents are not valid under the current encoding rules. -or- The encoded value is too big to fit in a value. is not an enum type. -or- was not declared with -or- . is , but . is not correct for the method. is The NamedBitList value converted to a . Reads a NamedBitList from with a specified tag under the specified encoding rules, converting it to the [] enum specified by . The buffer containing encoded data. The encoding constraints to use when interpreting the data. When this method returns, the total number of bytes for the encoded value. This parameter is treated as uninitialized. The tag to check for before reading, or for the default tag (Universal 3). Destination enum type. is not defined. The next value does not have the correct tag. -or- The length encoding is not valid under the current encoding rules. -or- The contents are not valid under the current encoding rules. -or- The encoded value is too big to fit in a value. is not an enum type. -or- was not declared with -or- . is , but . is not correct for the method. The NamedBitList value converted to a . Reads a value from with a specified tag under the specified encoding rules. The buffer containing encoded data. The encoding constraints to use when interpreting the data. When this method returns, the total number of bytes for the encoded value. This parameter is treated as uninitialized. The tag to check for before reading, or for the default tag (Universal 5). is not defined. The next value does not have the correct tag. -or- The length encoding is not valid under the current encoding rules. -or- The contents are not valid under the current encoding rules. . is , but . is not correct for the method. Reads an Object Identifier value from with a specified tag under the specified encoding rules. The buffer containing encoded data. The encoding constraints to use when interpreting the data. When this method returns, the total number of bytes for the encoded value. This parameter is treated as uninitialized. The tag to check for before reading, or for the default tag (Universal 6). is not defined. The next value does not have the correct tag. -or- The length encoding is not valid under the current encoding rules. -or- The contents are not valid under the current encoding rules. . is , but . is not correct for the method. The decoded object identifier, in dotted-decimal notation. Reads an Octet String value from with a specified tag under the specified encoding rules, returning the contents in a new array. The buffer containing encoded data. The encoding constraints to use when interpreting the data. When this method returns, the total number of bytes for the encoded value. This parameter is treated as uninitialized. The tag to check for before reading, or for the default tag (Universal 4). is not defined. The next value does not have the correct tag. -or- The length encoding is not valid under the current encoding rules. -or- The contents are not valid under the current encoding rules. . is , but . is not correct for the method. An array containing the contents of the Octet String value. Reads a Sequence or Sequence-Of value from with a specified tag under the specified encoding rules. The buffer containing encoded data. The encoding constraints to use when interpreting the data. When this method returns, the offset of the content payload relative to the start of . This parameter is treated as uninitialized. When this method returns, the number of bytes in the content payload (which may be 0). This parameter is treated as uninitialized. When this method returns, the total number of bytes for the encoded value. This parameter is treated as uninitialized. The tag to check for before reading, or for the default tag (Universal 16). is not defined. The next value does not have the correct tag. -or- The length encoding is not valid under the current encoding rules. -or- The contents are not valid under the current encoding rules. . is , but . is not correct for the method. Reads a Set-Of value from with a specified tag under the specified encoding rules. The buffer containing encoded data. The encoding constraints to use when interpreting the data. When this method returns, the offset of the content payload relative to the start of . This parameter is treated as uninitialized. When this method returns, the number of bytes in the content payload (which may be 0). This parameter is treated as uninitialized. When this method returns, the total number of bytes for the encoded value. This parameter is treated as uninitialized. to always accept the data in the order it is presented, to verify that the data is sorted correctly when the encoding rules say sorting was required (CER and DER). The tag to check for before reading, or for the default tag (Universal 17). is not defined. The next value does not have the correct tag. -or- The length encoding is not valid under the current encoding rules. -or- The contents are not valid under the current encoding rules. . is , but . is not correct for the method. Reads a UtcTime value from with a specified tag under the specified encoding rules. The buffer containing encoded data. The encoding constraints to use when interpreting the data. When this method returns, the total number of bytes for the encoded value. This parameter is treated as uninitialized. The largest year to represent with this value. The default value, 2049, represents the 1950-2049 range for X.509 certificates. The tag to check for before reading, or for the default tag (Universal 24). is not defined. -or- is not in the range [99, 9999]. The next value does not have the correct tag. -or- The length encoding is not valid under the current encoding rules. -or- The contents are not valid under the current encoding rules. . is , but . is not correct for the method. The decoded value. Attempts to copy a Bit String value from with a specified tag under the specified encoding rules into . The buffer containing encoded data. The buffer in which to write. The encoding constraints to use when interpreting the data. On success, receives the number of bits in the last byte which were reported as "unused" by the writer. This parameter is treated as uninitialized. When this method returns, the total number of bytes for the encoded value. This parameter is treated as uninitialized. When this method returns, the total number of bytes written to . This parameter is treated as uninitialized. The tag to check for before reading, or for the default tag (Universal 3). is not defined. The next value does not have the correct tag. -or- The length encoding is not valid under the current encoding rules. -or- The contents are not valid under the current encoding rules. . is , but . is not correct for the method. -or- overlaps . if is large enough to receive the value of the Bit String; otherwise, . Reads a character string value from with a specified tag under the specified encoding rules, copying the decoded string into a provided destination buffer. The buffer containing encoded data. The buffer in which to write. The encoding constraints to use when interpreting the data. One of the enumeration values which represents the value type to process. When this method returns, the total number of bytes for the encoded value. This parameter is treated as uninitialized. When this method returns, the number of chars written to . This parameter is treated as uninitialized. The tag to check for before reading, or for the universal tag that is appropriate to the requested encoding type. is not defined. -or- is not a known character string type. The next value does not have the correct tag. -or- The length encoding is not valid under the current encoding rules. -or- The contents are not valid under the current encoding rules. -or- The string did not successfully decode. . is , but . is not the same as . and advances the reader if had sufficient length to receive the value, otherwise and the reader does not advance. Attempts to read a character string value from with a specified tag under the specified encoding rules, copying the unprocessed bytes into the provided destination buffer. The buffer containing encoded data. The buffer in which to write. The encoding constraints to use when interpreting the data. The tag to check for before reading. When this method returns, the total number of bytes for the encoded value. This parameter is treated as uninitialized. On success, receives the number of bytes written to . is not defined. The next value does not have the correct tag. -or- The length encoding is not valid under the current encoding rules. -or- The contents are not valid under the current encoding rules. . is , but . is not a character string tag type. -or- overlaps . if is large enough to receive the value of the unprocessed character string; otherwise, . Attempts locate the contents range for the encoded value at the beginning of the buffer using the specified encoding rules. The buffer containing encoded data. The encoding constraints to use when interpreting the data. When this method returns, the tag identifying the content. This parameter is treated as uninitialized. When this method returns, the offset of the content payload relative to the start of . This parameter is treated as uninitialized. When this method returns, the number of bytes in the content payload (which may be 0). This parameter is treated as uninitialized. When this method returns, the total number of bytes for the encoded value. This parameter is treated as uninitialized. is not defined. if represents a valid structural encoding for the specified encoding rules; otherwise, . Attempts to read an Integer value from with a specified tag under the specified encoding rules as a signed 32-bit value. The buffer containing encoded data. The encoding constraints to use when interpreting the data. On success, receives the interpreted numeric value. This parameter is treated as uninitialized. When this method returns, the total number of bytes for the encoded value. This parameter is treated as uninitialized. The tag to check for before reading, or for the default tag (Universal 2). is not defined. The next value does not have the correct tag. -or- The length encoding is not valid under the current encoding rules. -or- The contents are not valid under the current encoding rules. . is , but . is not correct for the method. if the Integer represents value is between Int32.MinValue and Int32.MaxValue, inclusive; otherwise, . Attempts to read an Integer value from with a specified tag under the specified encoding rules as a signed 64-bit value. The buffer containing encoded data. The encoding constraints to use when interpreting the data. On success, receives the interpreted numeric value. This parameter is treated as uninitialized. When this method returns, the total number of bytes for the encoded value. This parameter is treated as uninitialized. The tag to check for before reading, or for the default tag (Universal 2). is not defined. The next value does not have the correct tag. -or- The length encoding is not valid under the current encoding rules. -or- The contents are not valid under the current encoding rules. . is , but . is not correct for the method. if the Integer represents value is between Int64.MinValue and Int64.MaxValue, inclusive; otherwise, . Attempts to get an Octet String value from with a specified tag under the specified encoding rules, copying the value into the provided destination buffer. The buffer containing encoded data. The buffer in which to write. The encoding constraints to use when interpreting the data. When this method returns, the total number of bytes for the encoded value. This parameter is treated as uninitialized. When this method returns, the total number of bytes written to . This parameter is treated as uninitialized. The tag to check for before reading, or for the default tag (Universal 4). is not defined. The next value does not have the correct tag. -or- The length encoding is not valid under the current encoding rules. -or- The contents are not valid under the current encoding rules. . is , but . is not correct for the method. -or- overlaps . if is large enough to receive the value of the Octet String; otherwise, . Attempts to get a Bit String value from with a specified tag under the specified encoding rules, if the value is contained in a single (primitive) encoding. The buffer containing encoded data. The encoding constraints to use when interpreting the data. On success, receives the number of bits in the last byte which were reported as "unused" by the writer. This parameter is treated as uninitialized. On success, receives a slice of the input buffer that corresponds to the value of the Bit String. This parameter is treated as uninitialized. When this method returns, the total number of bytes for the encoded value. This parameter is treated as uninitialized. The tag to check for before reading, or for the default tag (Universal 3). is not defined. The next value does not have the correct tag. -or- The length encoding is not valid under the current encoding rules. -or- The contents are not valid under the current encoding rules. . is , but . is not correct for the method. if the Bit String value has a primitive encoding and all of the bits reported as unused are set to 0; otherwise, . Attempts to get an unprocessed character string value from with a specified tag under the specified encoding rules, if the value is contained in a single (primitive) encoding. The buffer containing encoded data. The encoding constraints to use when interpreting the data. The tag to check for before reading. On success, receives a slice of the input buffer that corresponds to the value of the Bit String. This parameter is treated as uninitialized. When this method returns, the total number of bytes for the encoded value. This parameter is treated as uninitialized. is not defined. The next value does not have the correct tag. -or- The length encoding is not valid under the current encoding rules. -or- The contents are not valid under the current encoding rules. . is , but . is not a character string tag type. if the character string value has a primitive encoding; otherwise, . Attempts to get an Octet String value from with a specified tag under the specified encoding rules, if the value is contained in a single (primitive) encoding. The buffer containing encoded data. The encoding constraints to use when interpreting the data. On success, receives a slice of the input buffer that corresponds to the value of the Octet String. This parameter is treated as uninitialized. When this method returns, the total number of bytes for the encoded value. This parameter is treated as uninitialized. The tag to check for before reading, or for the default tag (Universal 4). is not defined. The next value does not have the correct tag. -or- The length encoding is not valid under the current encoding rules. -or- The contents are not valid under the current encoding rules. . is , but . is not correct for the method. if the Octet String value has a primitive encoding; otherwise, . Attempts to read an Integer value from with a specified tag under the specified encoding rules as an unsigned 32-bit value. The buffer containing encoded data. The encoding constraints to use when interpreting the data. On success, receives the interpreted numeric value. This parameter is treated as uninitialized. When this method returns, the total number of bytes for the encoded value. This parameter is treated as uninitialized. The tag to check for before reading, or for the default tag (Universal 2). is not defined. The next value does not have the correct tag. -or- The length encoding is not valid under the current encoding rules. -or- The contents are not valid under the current encoding rules. . is , but . is not correct for the method. if the Integer represents value is between UInt32.MinValue and UInt32.MaxValue, inclusive; otherwise, . Attempts to read an Integer value from with a specified tag under the specified encoding rules as an unsigned 64-bit value. The buffer containing encoded data. The encoding constraints to use when interpreting the data. On success, receives the interpreted numeric value. This parameter is treated as uninitialized. When this method returns, the total number of bytes for the encoded value. This parameter is treated as uninitialized. The tag to check for before reading, or for the default tag (Universal 2). is not defined. The next value does not have the correct tag. -or- The length encoding is not valid under the current encoding rules. -or- The contents are not valid under the current encoding rules. . is , but . is not correct for the method. if the Integer represents value is between UInt64.MinValue and UInt64.MaxValue, inclusive; otherwise, . The encoding ruleset for an or . ITU-T X.690 Basic Encoding Rules. ITU-T X.690 Canonical Encoding Rules. ITU-T X.690 Distinguished Encoding Rules. A stateful, forward-only reader for BER-, CER-, or DER-encoded ASN.1 data. Construct an over with a given ruleset. The data to read. The encoding constraints for the reader. Additional options for the reader. is not defined. Clones the current reader. A clone of the current reader. Get a view of the content octets (bytes) of the next encoded value without advancing the reader. The reader is positioned at a point where the tag or length is invalid under the current encoding rules. The bytes of the contents octets of the next encoded value. Get a view of the next encoded value without advancing the reader. For indefinite length encodings this includes the End of Contents marker. The reader is positioned at a point where the tag or length is invalid under the current encoding rules. The bytes of the next encoded value. Read the encoded tag at the next data position, without advancing the reader. A tag could not be decoded at the reader's current position. The decoded tag value. Reads the next value as a BIT STRING with a specified tag, returning the value in a byte array. On success, receives the number of bits in the last byte which were reported as "unused" by the writer. The tag to check for before reading, or for the default tag (Universal 1). The next value does not have the correct tag. -or- The length encoding is not valid under the current encoding rules. -or- The contents are not valid under the current encoding rules. . is , but . is not correct for the method. A copy of the value in a newly allocated, precisely sized, array. Reads the next value as a Boolean with a specified tag. The tag to check for before reading, or for the default tag (Universal 1). The next value does not have the correct tag. -or- The length encoding is not valid under the current encoding rules. -or- The contents are not valid under the current encoding rules. . is , but . is not correct for the method. The decoded value. Reads the next value as character string with the specified tag and encoding type, returning the decoded value as a string. One of the enumeration values representing the value type to process. The tag to check for before reading, or for the universal tag that is appropriate to the requested encoding type. is not a known character string type. The next value does not have the correct tag. -or- The length encoding is not valid under the current encoding rules. -or- The contents are not valid under the current encoding rules. -or- The string did not successfully decode. . is , but . is not the same as . The decoded value. Get a view of the next encoded value, and advance the reader past it. For an indefinite length encoding this includes the End of Contents marker. A view of the next encoded value. Reads the next value as a Enumerated with a specified tag, returning the contents as a over the original data. The tag to check for before reading, or for the default tag (Universal 10). The next value does not have the correct tag. -or- The length encoding is not valid under the current encoding rules. -or- The contents are not valid under the current encoding rules. . is , but . is not correct for the method. The bytes of the Enumerated value, in signed big-endian form. Reads the next value as an Enumerated with a specified tag, converting it to the non-[] enum specified by . Type object representing the destination type. The tag to check for before reading, or for the default tag (Universal 10). The next value does not have the correct tag. -or- The length encoding is not valid under the current encoding rules. -or- The contents are not valid under the current encoding rules. -or- The encoded value is too big to fit in a value. is not an enum type. -or- was declared with . -or- . is , but . is not correct for the method. is . The Enumerated value converted to a . Reads the next value as an Enumerated with a specified tag, converting it to the non-[] enum specified by . The tag to check for before reading, or for the default tag (Universal 10). Destination enum type. The next value does not have the correct tag. -or- The length encoding is not valid under the current encoding rules. -or- The contents are not valid under the current encoding rules. -or- The encoded value is too big to fit in a value. is not an enum type. -or- was declared with . -or- . is , but . is not correct for the method. The Enumerated value converted to a . Reads the next value as a GeneralizedTime with a specified tag. The tag to check for before reading, or for the default tag (Universal 24). The next value does not have the correct tag. -or- The length encoding is not valid under the current encoding rules. -or- The contents are not valid under the current encoding rules. . is , but . is not correct for the method. The decoded value. Reads the next value as an Integer with a specified tag. The tag to check for before reading, or for the default tag (Universal 2). The next value does not have the correct tag. -or- The length encoding is not valid under the current encoding rules. -or- The contents are not valid under the current encoding rules. . is , but . is not correct for the method. The decoded value. Reads the next value as a Integer with a specified tag, returning the contents as a over the original data. The tag to check for before reading, or for the default tag (Universal 2). The next value does not have the correct tag. -or- The length encoding is not valid under the current encoding rules. -or- The contents are not valid under the current encoding rules. . is , but . is not correct for the method. The bytes of the Integer value, in signed big-endian form. Reads the next value as a NamedBitList with a specified tag. The tag to check for before reading. The next value does not have the correct tag. -or- The length encoding is not valid under the current encoding rules. -or- The contents are not valid under the current encoding rules. . is , but . is not correct for the method. The bits from the encoded value. Reads the next value as a NamedBitList with a specified tag, converting it to the [] enum specified by . Type object representing the destination type. The tag to check for before reading. The next value does not have the correct tag. -or- The length encoding is not valid under the current encoding rules. -or- The contents are not valid under the current encoding rules. -or- The encoded value is too big to fit in a value. is not an enum type. -or- was not declared with -or- . is , but . is not correct for the method. is The NamedBitList value converted to a . Reads the next value as a NamedBitList with a specified tag, converting it to the [] enum specified by . The tag to check for before reading. Destination enum type. The next value does not have the correct tag. -or- The length encoding is not valid under the current encoding rules. -or- The contents are not valid under the current encoding rules. -or- The encoded value is too big to fit in a value. is not an enum type. -or- was not declared with -or- . is , but . is not correct for the method. The NamedBitList value converted to a . Reads the next value as a NULL with a specified tag. The tag to check for before reading, or for the default tag (Universal 5). The next value does not have the correct tag. -or- The length encoding is not valid under the current encoding rules. -or- The contents are not valid under the current encoding rules. . is , but . is not correct for the method. Reads the next value as an OBJECT IDENTIFIER with a specified tag, returning the value in a dotted decimal format string. The tag to check for before reading, or for the default tag (Universal 6). The next value does not have the correct tag. -or- The length encoding is not valid under the current encoding rules. -or- The contents are not valid under the current encoding rules. . is , but . is not correct for the method. The object identifier value in a dotted decimal format string. Reads the next value as an OCTET STRING with tag UNIVERSAL 4, returning the value in a byte array. The tag to check for before reading, or for the default tag (Universal 4). The next value does not have the correct tag. -or- The length encoding is not valid under the current encoding rules. -or- The contents are not valid under the current encoding rules. . is , but . is not correct for the method. A copy of the value in a newly allocated, precisely sized, array. Reads the next value as a SEQUENCE or SEQUENCE-OF with the specified tag and returns the result as a new reader positioned at the first value in the sequence (or with == ). The tag to check for before reading, or for the default tag (Universal 16). The next value does not have the correct tag. -or- The length encoding is not valid under the current encoding rules. -or- The contents are not valid under the current encoding rules. . is , but . is not correct for the method. A new reader positioned at the first value in the sequence (or with == ). Reads the next value as a SET-OF with the specified tag and returns the result as a new reader positioned at the first value in the set-of (or with == ). to always accept the data in the order it is presented, to verify that the data is sorted correctly when the encoding rules say sorting was required (CER and DER). The tag to check for before reading, or for the default tag (Universal 17). The next value does not have the correct tag. -or- The length encoding is not valid under the current encoding rules. -or- The contents are not valid under the current encoding rules. . is , but . is not correct for the method. A new reader positioned at the first value in the set-of (or with == ). Reads the next value as a SET-OF with the specified tag and returns the result as a new reader positioned at the first value in the set-of (or with == ), using the value from the constructor (default ). The tag to check for before reading, or for the default tag (Universal 17). The next value does not have the correct tag. -or- The length encoding is not valid under the current encoding rules. -or- The contents are not valid under the current encoding rules. . is , but . is not correct for the method. A new reader positioned at the first value in the set-of (or with == ). Reads the next value as a UTCTime with a specified tag. The largest year to represent with this value. The tag to check for before reading, or for the default tag (Universal 23). The next value does not have the correct tag. -or- The length encoding is not valid under the current encoding rules. -or- The contents are not valid under the current encoding rules. . is , but . is not correct for the method. The decoded value. Reads the next value as a UTCTime with a specified tag using the value from options passed to the constructor (with a default of 2049). The tag to check for before reading, or for the default tag (Universal 23). The next value does not have the correct tag. -or- The length encoding is not valid under the current encoding rules. -or- The contents are not valid under the current encoding rules. . is , but . is not correct for the method. The decoded value. Throws a standardized if the reader has remaining data, performs no function if returns . Reads the next value as a BIT STRING with a specified tag, copying the value into a provided destination buffer. The buffer in which to write. On success, receives the number of bits in the last byte which were reported as "unused" by the writer. On success, receives the number of bytes written to . The tag to check for before reading, or for the default tag (Universal 1). The next value does not have the correct tag. -or- The length encoding is not valid under the current encoding rules. -or- The contents are not valid under the current encoding rules. . is , but . is not correct for the method. and advances the reader if had sufficient length to receive the value, otherwise and the reader does not advance. Reads the next value as character string with the specified tag and encoding type, copying the decoded value into a provided destination buffer. The buffer in which to write. One of the enumeration values representing the value type to process. On success, receives the number of chars written to . The tag to check for before reading, or for the universal tag that is appropriate to the requested encoding type. is not a known character string type. The next value does not have the correct tag. -or- The length encoding is not valid under the current encoding rules. -or- The contents are not valid under the current encoding rules. -or- The string did not successfully decode. . is , but . is not the same as . and advances the reader if had sufficient length to receive the value, otherwise and the reader does not advance. Reads the next value as character string with the specified tag, copying the unprocessed bytes into a provided destination buffer. The buffer in which to write. The tag to check for before reading. On success, receives the number of bytes written to . The next value does not have the correct tag. -or- The length encoding is not valid under the current encoding rules. -or- The contents are not valid under the current encoding rules. . is , but . is not a character string tag type. and advances the reader if had sufficient length to receive the value, otherwise and the reader does not advance. Attempts to read the next value as an Integer with a specified tag, as a signed 32-bit value. On success, receives the decoded value. The tag to check for before reading, or for the default tag (Universal 2). The next value does not have the correct tag. -or- The length encoding is not valid under the current encoding rules. -or- The contents are not valid under the current encoding rules. . is , but . is not correct for the method. and does not advance the reader if the value is not between Int32.MinValue and Int32.MaxValue, inclusive; otherwise is returned and the reader advances. Attempts to read the next value as an Integer with a specified tag, as a signed 64-bit value. On success, receives the decoded value. The tag to check for before reading, or for the default tag (Universal 2). The next value does not have the correct tag. -or- The length encoding is not valid under the current encoding rules. -or- The contents are not valid under the current encoding rules. . is , but . is not correct for the method. and does not advance the reader if the value is not between Int64.MinValue and Int64.MaxValue, inclusive; otherwise is returned and the reader advances. Reads the next value as an OCTET STRING with a specified tag, copying the value into a provided destination buffer. The buffer in which to write. On success, receives the number of bytes written to . The tag to check for before reading, or for the default tag (Universal 4). The next value does not have the correct tag. -or- The length encoding is not valid under the current encoding rules. -or- The contents are not valid under the current encoding rules. . is , but . is not correct for the method. and advances the reader if had sufficient length to receive the value, otherwise and the reader does not advance. Reads the next value as a BIT STRING with a specified tag, returning the contents as a over the original data. On success, receives the number of bits in the last byte which were reported as "unused" by the writer. On success, receives a over the original data corresponding to the value of the BIT STRING. The tag to check for before reading, or for the default tag (Universal 1). The next value does not have the correct tag. -or- The length encoding is not valid under the current encoding rules. -or- The contents are not valid under the current encoding rules. . is , but . is not correct for the method. and advances the reader if the BIT STRING value had a primitive encoding, and does not advance the reader if it had a constructed encoding. Reads the next value as a character with a specified tag, returning the contents as an unprocessed over the original data. The tag to check for before reading. On success, receives a over the original data corresponding to the value of the character string. The next value does not have the correct tag. -or- The length encoding is not valid under the current encoding rules. -or- The contents are not valid under the current encoding rules. . is , but . is not a character string tag type. and advances the reader if the character string value had a primitive encoding, and does not advance the reader if it had a constructed encoding. Attempts to read the next value as an OCTET STRING with a specified tag, returning the contents as a over the original data. On success, receives a over the original data corresponding to the value of the OCTET STRING. The tag to check for before reading. The next value does not have the correct tag. -or- The length encoding is not valid under the current encoding rules. -or- The contents are not valid under the current encoding rules. . is , but . is not correct for the method. and advances the reader if the OCTET STRING value had a primitive encoding, and does not advance the reader if it had a constructed encoding. Attempts to read the next value as an Integer with a specified tag, as an unsigned 32-bit value. On success, receives the decoded value. The tag to check for before reading, or for the default tag (Universal 2). The next value does not have the correct tag. -or- The length encoding is not valid under the current encoding rules. -or- The contents are not valid under the current encoding rules. . is , but . is not correct for the method. and does not advance the reader if the value is not between UInt32.MinValue and UInt32.MaxValue, inclusive; otherwise is returned and the reader advances. Attempts to read the next value as an Integer with a specified tag, as an unsigned 64-bit value. On success, receives the decoded value. The tag to check for before reading, or for the default tag (Universal 2). The next value does not have the correct tag. -or- The length encoding is not valid under the current encoding rules. -or- The contents are not valid under the current encoding rules. . is , but . is not correct for the method. and does not advance the reader if the value is not between UInt64.MinValue and UInt64.MaxValue, inclusive; otherwise is returned and the reader advances. Gets an indication of whether the reader has remaining data available to process. if there is more data available for the reader to process; otherwise, . Gets the encoding rules in use by this reader. The encoding rules in use by this reader. Specifies options that modify the behavior of an . Gets or sets a value that indicates whether the reader should bypass sort ordering on a Set or Set-Of value. if the reader should not validate that a Set or Set-Of value is sorted correctly for the current encoding rules; otherwise . The default is . Gets or sets the largest year to represent with a UtcTime value. The largest year to represent with a UtcTime value. The default is 2049. A writer for BER-, CER-, and DER-encoded ASN.1 data. Create a new with a given set of encoding rules. The encoding constraints for the writer. is not defined. Initializes a new instance of with a given set of encoding rules and an initial capacity. The encoding constraints for the writer. The minimum capacity with which to initialize the underlying buffer. is not defined. -or- is a negative number. Copy the value of this writer into another. The writer to receive the value. is . A or has not been closed via or . -or- This writer is empty. -or- This writer represents more than one top-level value. -or- This writer's value is encoded in a manner that is not compatible with the ruleset for the destination writer. Return a new array containing the encoded value. A or has not been closed via or . A precisely-sized array containing the encoded value. Writes the encoded representation of the data to . The buffer in which to write. A or has not been closed via or . The number of bytes written to . Determines if would produce an output identical to . The instance to compare encoded values against. is . A or has not been closed via or . if the pending encoded data is identical to , otherwise. Determines if would produce an output identical to . The encoded value to compare against. A or has not been closed via or . if the pending encoded data is identical to , otherwise. Gets the number of bytes that would be written by . , , or was called without the corresponding Pop method. The number of bytes that would be written by . Indicate that the open Octet String with the tag UNIVERSAL 4 is closed, returning the writer to the parent context. The tag to write, or for the default tag (Universal 4). . is , but . is not correct for the method. the writer is not currently positioned within an Octet String with the specified tag. Indicate that the open Sequence with the specified tag is closed, returning the writer to the parent context. The tag to write, or for the default tag (Universal 16). . is , but . is not correct for the method. the writer is not currently positioned within a Sequence with the specified tag. Indicate that the open Set-Of with the specified tag is closed, returning the writer to the parent context. The tag to write, or for the default tag (Universal 17). . is , but . is not correct for the method. the writer is not currently positioned within a Set-Of with the specified tag. Begin writing an Octet String value with a specified tag. The tag to write, or for the default tag (Universal 4). A disposable value which will automatically call . Begin writing a Sequence with a specified tag. The tag to write, or for the default tag (Universal 16). . is , but . is not correct for the method. A disposable value which will automatically call . Begin writing a Set-Of with a specified tag. The tag to write, or for the default tag (Universal 17). . is , but . is not correct for the method. A disposable value which will automatically call . Reset the writer to have no data, without releasing resources. Attempts to write the encoded representation of the data to . The buffer in which to write. On success, receives the number of bytes written to . A or has not been closed via or . if the encode succeeded, if is too small. Write a Bit String value with a specified tag. The value to write. The number of trailing bits which are not semantic. The tag to write, or for the default tag (Universal 3). . is , but . is not correct for the method. -or- has length 0 and is not 0 -or- is not empty and any of the bits identified by is set. is not in the range [0,7]. Write a Boolean value with a specified tag. The value to write. The tag to write, or for the default tag (Universal 1). . is , but . is not correct for the method Write the provided string using the specified encoding type using the specified tag corresponding to the encoding type. One of the enumeration values representing the encoding to use. The string to write. The tag to write, or for the universal tag that is appropriate to the requested encoding type. is not a restricted character string encoding type. -or- is a restricted character string encoding type that is not currently supported by this method. . is , but . is not correct for the method. Write the provided string using the specified encoding type using the specified tag corresponding to the encoding type. One of the enumeration values representing the encoding to use. The string to write. The tag to write, or for the universal tag that is appropriate to the requested encoding type. is is not a restricted character string encoding type. -or- is a restricted character string encoding type that is not currently supported by this method. . is , but . is not correct for the method. Write a single value which has already been encoded. The value to write. could not be read under the current encoding rules. -or- has data beyond the end of the first value. Write a non-[] enum value as an Enumerated with tag UNIVERSAL 10. The boxed enumeration value to write. The tag to write, or for the default tag (Universal 10). is . . is , but . is not correct for the method. -or- is not a boxed enum value. -or- the unboxed type of is declared []. Write a non-[] enum value as an Enumerated with tag UNIVERSAL 10. The boxed enumeration value to write. The tag to write, or for the default tag (Universal 10). The non-[] enumeration type to write. is . . is , but . is not correct for the method. -or- is not an enum. -or- is declared []. Write the provided as a GeneralizedTime with a specified UNIVERSAL 24, optionally excluding the fractional seconds. The value to write. to treat the fractional seconds in as 0 even if a non-zero value is present. The tag to write, or for the default tag (Universal 24). . is , but . is not correct for the method. Write an Integer value with a specified tag. The value to write. The tag to write, or for the default tag (Universal 2). . is , but . is not correct for the method. Write an Integer value with a specified tag. The value to write. The tag to write, or for the default tag (Universal 2). . is , but . is not correct for the method. Write an Integer value with a specified tag. The integer value to write, in signed big-endian byte order. The tag to write, or for the default tag (Universal 2). . is , but . is not correct for the method. the 9 most significant bits are all set. -or- the 9 most significant bits are all unset. Write an Integer value with a specified tag. The value to write. The tag to write, or for the default tag (Universal 2). . is , but . is not correct for the method. Write an Integer value with a specified tag. The integer value to write, in unsigned big-endian byte order. The tag to write, or for the default tag (Universal 2). . is , but . is not correct for the method. the 9 most significant bits are all unset. Write a bit array value as a NamedBitList with a specified tag. The bits to write. The tag to write, or for the default tag (Universal 3). . is , but . is not correct for the method. is . Write a [] enum value as a NamedBitList with a specified tag. The boxed enumeration value to write. The tag to write, or for the default tag (Universal 3). . is , but . is not correct for the method. -or- is not a boxed enum value. -or- the unboxed type of is not declared []. is . Write a [] enum value as a NamedBitList with a specified tag. The enumeration value to write. The tag to write, or for the default tag (Universal 3). The [] enumeration type to write. . is , but . is not correct for the method. -or- is not an enum value. -or- is not declared []. Write NULL with a specified tag. The tag to write, or for the default tag (Universal 5). . is , but . is not correct for the method. Write an Object Identifier with a specified tag. The object identifier to write. The tag to write, or for the default tag (Universal 6). . is , but . is not correct for the method. -or- is not a valid dotted decimal object identifier. Write an Object Identifier with a specified tag. The object identifier to write. The tag to write, or for the default tag (Universal 6). . is , but . is not correct for the method. -or- is not a valid dotted decimal object identifier. is . Write an Octet String value with a specified tag. The value to write. The tag to write, or for the default tag (Universal 4). . is , but . is not correct for the method. Write the provided value as a UTCTime with a specified tag, provided the year is in the allowed range. The value to write. The maximum valid year for , after conversion to UTC. For the X.509 Time.utcTime range of 1950-2049, pass 2049. The tag to write, or for the default tag (Universal 23). . is , but . is not correct for the method. . (after conversion to UTC) is not in the range ( - 100, ]. Write the provided value as a UTCTime with a specified tag, accepting the two-digit year as valid in context. The value to write. The tag to write, or for the default tag (Universal 23). . is , but . is not correct for the method. Gets the encoding rules in use by this writer. The encoding rules in use by this writer. Provides an target for safely closing an opened tag by using a lexical scope as a logical scope. Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. The tag class for a particular ASN.1 tag. The Application tag class. The Context-Specific tag class. The Private tag class. The Universal tag class. Tag assignments for the UNIVERSAL class in ITU-T X.680. The universal class tag value for Bit String. The universal class tag value for BMPString. The universal class tag value for Boolean. The universal class tag value for Date. The universal class tag value for Date-Time. The universal class tag value for Duration. The universal class tag value for Embedded-PDV. The reserved identifier for the End-of-Contents marker in an indefinite length encoding. The universal class tag value for Enumerated. The universal class tag value for External. The universal class tag value for GeneralizedTime. The universal class tag value for GeneralString. The universal class tag value for GraphicString. The universal class tag value for IA5String. The universal class tag value for Instance-Of. The universal class tag value for Integer. The universal class tag value for ISO646String (VisibleString). The universal class tag value for Null. The universal class tag value for NumericString. The universal class tag value for Object Descriptor. The universal class tag value for Object Identifier. The universal class tag value for Object Identifier Internationalized Resource Identifier (IRI). The universal class tag value for Octet String. The universal class tag value for PrintableString. The universal class tag value for Real. The universal class tag value for Relative Object Identifier. The universal class tag value for Relative Object Identifier Internationalized Resource Identifier (IRI). The universal class tag value for Sequence. The universal class tag value for Sequence-Of. The universal class tag value for Set. The universal class tag value for Set-Of. The universal class tag value for T61String (TeletexString). The universal class tag value for TeletexString (T61String). The universal class tag value for Time. The universal class tag value for Time-Of-Day. The universal class tag value for UniversalString. The universal class tag value for an unrestricted character string. The universal class tag value for UTCTime. The universal class tag value for UTF8String. The universal class tag value for VideotexString. The universal class tag value for VisibleString (ISO646String).