Beispiel #1
0
 /// <inheritdoc />
 public override void ReadData(PresentationReader reader)
 {
     while (!reader.IsEndOfLine())
     {
         Strings.Add(reader.ReadString());
     }
 }
Beispiel #2
0
 /// <inheritdoc />
 public override void ReadData(PresentationReader reader)
 {
     Flags     = (DNSKEYFlags)reader.ReadUInt16();
     Protocol  = reader.ReadByte();
     Algorithm = (SecurityAlgorithm)reader.ReadByte();
     PublicKey = reader.ReadBase64String();
 }
Beispiel #3
0
 /// <inheritdoc />
 public override void ReadData(PresentationReader reader)
 {
     NextOwnerName = reader.ReadDomainName();
     while (!reader.IsEndOfLine())
     {
         Types.Add(reader.ReadDnsType());
     }
 }
Beispiel #4
0
 /// <inheritdoc />
 public override void ReadData(PresentationReader reader)
 {
     PrimaryName  = reader.ReadDomainName();
     Mailbox      = reader.ReadDomainName();
     SerialNumber = reader.ReadUInt32();
     Refresh      = reader.ReadTimeSpan32();
     Retry        = reader.ReadTimeSpan32();
     Expire       = reader.ReadTimeSpan32();
     Minimum      = reader.ReadTimeSpan32();
 }
Beispiel #5
0
 /// <inheritdoc />
 public override void ReadData(PresentationReader reader)
 {
     Algorithm         = reader.ReadDomainName();
     TimeSigned        = reader.ReadDateTime();
     Fudge             = reader.ReadTimeSpan16();
     MAC               = Convert.FromBase64String(reader.ReadString());
     OriginalMessageId = reader.ReadUInt16();
     Error             = (MessageStatus)reader.ReadUInt16();
     OtherData         = Convert.FromBase64String(reader.ReadString());
 }
Beispiel #6
0
 /// <inheritdoc />
 public override void ReadData(PresentationReader reader)
 {
     Algorithm  = reader.ReadDomainName();
     Inception  = reader.ReadDateTime();
     Expiration = reader.ReadDateTime();
     Mode       = (KeyExchangeMode)reader.ReadUInt16();
     Error      = (MessageStatus)reader.ReadUInt16();
     Key        = Convert.FromBase64String(reader.ReadString());
     OtherData  = Convert.FromBase64String(reader.ReadString());
 }
Beispiel #7
0
 /// <inheritdoc />
 public override void ReadData(PresentationReader reader)
 {
     TypeCovered         = reader.ReadDnsType();
     Algorithm           = (SecurityAlgorithm)reader.ReadByte();
     Labels              = reader.ReadByte();
     OriginalTTL         = reader.ReadTimeSpan32();
     SignatureExpiration = reader.ReadDateTime();
     SignatureInception  = reader.ReadDateTime();
     KeyTag              = reader.ReadUInt16();
     SignerName          = reader.ReadDomainName();
     Signature           = reader.ReadBase64String();
 }
Beispiel #8
0
        /// <inheritdoc />
        public override void ReadData(PresentationReader reader)
        {
            HashAlgorithm = (DigestType)reader.ReadByte();
            Flags         = reader.ReadByte();
            Iterations    = reader.ReadUInt16();

            var salt = reader.ReadString();

            if (salt != "-")
            {
                Salt = Base16.Decode(salt).ToArray();
            }
        }
Beispiel #9
0
        /// <inheritdoc />
        public override void ReadData(PresentationReader reader)
        {
            KeyTag        = reader.ReadUInt16();
            Algorithm     = (SecurityAlgorithm)reader.ReadByte();
            HashAlgorithm = (DigestType)reader.ReadByte();

            // Whitespace is allowed within the hexadecimal text.
            var sb = new StringBuilder();

            while (!reader.IsEndOfLine())
            {
                sb.Append(reader.ReadString());
            }
            Digest = Base16.Decode(sb.ToString()).ToArray();
        }
Beispiel #10
0
        /// <inheritdoc />
        public override void ReadData(PresentationReader reader)
        {
            HashAlgorithm = (DigestType)reader.ReadByte();
            Flags         = (NSEC3Flags)reader.ReadByte();
            Iterations    = reader.ReadUInt16();

            var salt = reader.ReadString();

            if (salt != "-")
            {
                Salt = Base16.Decode(salt).ToArray();
            }

            NextHashedOwnerName = Base32.ExtendedHex.Decode(reader.ReadString()).ToArray();

            while (!reader.IsEndOfLine())
            {
                Types.Add(reader.ReadDnsType());
            }
        }
Beispiel #11
0
 /// <summary>
 ///   Read the textual representation of the data that is specific to
 ///   the resource record <see cref="Type"/>.
 /// </summary>
 /// <param name="reader">
 ///   The source of the resource record's data.
 /// </param>
 /// <remarks>
 ///   Derived classes must implement this method.
 /// </remarks>
 public virtual void ReadData(PresentationReader reader)
 {
 }
Beispiel #12
0
 /// <inheritdoc />
 public ResourceRecord Read(PresentationReader reader)
 {
     return(reader.ReadResourceRecord());
 }
Beispiel #13
0
 /// <inheritdoc />
 public override void ReadData(PresentationReader reader)
 {
     Address = reader.ReadIPAddress();
 }