Esempio n. 1
0
        /// <summary>
        ///   Reads the next value as a NULL with a specified tag.
        /// </summary>
        /// <param name="expectedTag">The tag to check for before reading.</param>
        /// <exception cref="CryptographicException">
        ///   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
        /// </exception>
        /// <exception cref="ArgumentException">
        ///   <paramref name="expectedTag"/>.<see cref="Asn1Tag.TagClass"/> is
        ///   <see cref="TagClass.Universal"/>, but
        ///   <paramref name="expectedTag"/>.<see cref="Asn1Tag.TagValue"/> is not correct for
        ///   the method
        /// </exception>
        public void ReadNull(Asn1Tag expectedTag)
        {
            AsnValueReader valueReader = OpenValueReader();

            valueReader.ReadNull(expectedTag);
            valueReader.MatchSlice(ref _data);
        }