Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
toPointer(name) {
assert(typeof name === 'string');
assert(util.isFQDN(name));
assert(this.isINET());
const ip = IP.toBuffer(this.target);
const data = ipPack(ip);
const hash = base32.encodeHex(data);
const labels = util.split(name);
const tld = util.label(name, labels, -1);
return `_${hash}.${tld}.`;
}