internal override void WriteDataSimple(byte[] buffer, int offset)
 {
     WriteParameters(buffer, offset);
     buffer.Write(offset + NextHashedOwnerNameLengthOffset, (byte)NextHashedOwnerName.Length);
     NextHashedOwnerName.Write(buffer, offset + NextHashedOwnerNameOffset);
     _typeBitmaps.Write(buffer, offset + TypeBitmapsOffset);
 }
Exemplo n.º 2
0
 internal override string RecordDataToString()
 {
     return((byte)HashAlgorithm
            + " " + Flags
            + " " + Iterations
            + " " + ((Salt.Length == 0) ? "-" : Salt.ToBase16String())
            + " " + NextHashedOwnerName.ToBase32HexString()
            + " " + String.Join(" ", Types.Select(RecordTypeHelper.ToShortString)));
 }
Exemplo n.º 3
0
 internal override string RecordDataToString()
 {
     return((byte)HashAlgorithm
            + " " + Flags
            + " " + Iterations
            + " " + ((Salt.Length == 0) ? "-" : Salt.ToBase16String())
            + " " + NextHashedOwnerName.ToBase32HexString()
            + " " + String.Join(" ", Types.ConvertAll <String>(ToString).ToArray()));
 }
Exemplo n.º 4
0
        internal bool IsCovering(DomainName name)
        {
            DomainName nextDomainName = new DomainName(NextHashedOwnerName.ToBase32HexString(), name.GetParentName());

            // NSEC*-Record are organized in a chained list with the last element pointing to the first.
            // So either the name being queries is between the current item (Name) and nextDomainName or
            // the current item is greater than the the next item. In this case, we have to cases:
            // 1. The name being queried is on the right side of the list (name > nextName)
            // 2. The name being queired is on the left side of the list (Name < name)
            // If one of these three criteria is met, the record is covering the name being queried.
            return((name.CompareTo(Name) > 0 && name.CompareTo(nextDomainName) < 0) ||
                   (Name.CompareTo(nextDomainName) > 0 && (name.CompareTo(Name) > 0 || name.CompareTo(nextDomainName) < 0)));
        }
Exemplo n.º 5
0
        internal bool IsCovering(DomainName name)
        {
            DomainName nextDomainName = new DomainName(NextHashedOwnerName.ToBase32HexString(), name.GetParentName());

            return((name.CompareTo(Name) > 0) && (name.CompareTo(nextDomainName) < 0));
        }
 public bool Equals(DnsResourceDataNextDomainSecure3 other)
 {
     return(EqualsParameters(other) &&
            NextHashedOwnerName.Equals(other.NextHashedOwnerName) &&
            _typeBitmaps.Equals(other._typeBitmaps));
 }