Exemple #1
0
        /// <inheritdoc />
        public override void WriteData(PresentationWriter writer)
        {
            writer.WriteByte((byte)HashAlgorithm);
            writer.WriteByte((byte)Flags);
            writer.WriteUInt16(Iterations);

            if (Salt == null || Salt.Length == 0)
            {
                writer.WriteString("-");
            }
            else
            {
                writer.WriteBase16String(Salt);
            }

            writer.WriteString(Base32.ExtendedHex.Encode(NextHashedOwnerName, padding: false).ToLowerInvariant());

            bool next = false;

            foreach (var type in Types)
            {
                if (next)
                {
                    writer.WriteSpace();
                }
                writer.WriteDnsType(type, appendSpace: false);
                next = true;
            }
        }
Exemple #2
0
 /// <inheritdoc />
 public override string ToString()
 {
     using (var s = new StringWriter())
     {
         var writer = new PresentationWriter(s);
         writer.WriteDomainName(Name);
         writer.WriteDnsClass(Class);
         writer.WriteDnsType(Type, appendSpace: false);
         return(s.ToString());
     }
 }
Exemple #3
0
 /// <inheritdoc />
 public override void WriteData(PresentationWriter writer)
 {
     writer.WriteDnsType(TypeCovered);
     writer.WriteByte((byte)Algorithm);
     writer.WriteByte(Labels);
     writer.WriteTimeSpan32(OriginalTTL);
     writer.WriteDateTime(SignatureExpiration);
     writer.WriteDateTime(SignatureInception);
     writer.WriteUInt16(KeyTag);
     writer.WriteDomainName(SignerName);
     writer.WriteBase64String(Signature, appendSpace: false);
 }
        /// <inheritdoc />
        public void Write(PresentationWriter writer)
        {
            writer.WriteDomainName(Name);
            if (TTL != DefaultTTL)
            {
                writer.WriteTimeSpan32(TTL);
            }
            writer.WriteDnsClass(Class);
            writer.WriteDnsType(Type);

            WriteData(writer);
            writer.WriteEndOfLine();
        }
Exemple #5
0
        /// <inheritdoc />
        public override void WriteData(PresentationWriter writer)
        {
            writer.WriteDomainName(NextOwnerName);

            bool next = false;

            foreach (var type in Types)
            {
                if (next)
                {
                    writer.WriteSpace();
                }
                writer.WriteDnsType(type, appendSpace: false);
                next = true;
            }
        }