Ejemplo n.º 1
0
  /** Converts rdata to a String */
  String rrToString() {
    StringBuffer sb = new StringBuffer();
    sb.append(hashAlg);
    sb.append(' ');
    sb.append(flags);
    sb.append(' ');
    sb.append(iterations);
    sb.append(' ');
    if (salt == null) sb.append('-');
    else sb.append(base16.toString(salt));
    sb.append(' ');
    sb.append(b32.toString(next));

    if (!types.empty()) {
      sb.append(' ');
      sb.append(types.toString());
    }

    return sb.toString();
  }
Ejemplo n.º 2
0
  void rrToWire(DNSOutput out, Compression c, boolean canonical) {
    out.writeU8(hashAlg);
    out.writeU8(flags);
    out.writeU16(iterations);

    if (salt != null) {
      out.writeU8(salt.length);
      out.writeByteArray(salt);
    } else out.writeU8(0);

    out.writeU8(next.length);
    out.writeByteArray(next);
    types.toWire(out);
  }
Ejemplo n.º 3
0
 /** Returns whether a specific type is in the set of types. */
 public boolean hasType(int type) {
   return types.contains(type);
 }
Ejemplo n.º 4
0
 /** Returns the set of types defined for this name */
 public int[] getTypes() {
   return types.toArray();
 }