コード例 #1
0
ファイル: DNSKEYRecord.cs プロジェクト: vsssunder/automatica
 /// <inheritdoc />
 public override void ReadData(PresentationReader reader)
 {
     Flags     = (DNSKEYFlags)reader.ReadUInt16();
     Protocol  = reader.ReadByte();
     Algorithm = (SecurityAlgorithm)reader.ReadByte();
     PublicKey = reader.ReadBase64String();
 }
コード例 #2
0
ファイル: RRSIGRecord.cs プロジェクト: vsssunder/automatica
 /// <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();
 }
コード例 #3
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();
            }
        }
コード例 #4
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();
        }
コード例 #5
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());
            }
        }