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);
  }