How to use the bns.dnssec.hashes function in bns

To help you get started, we’ve selected a few bns examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github handshake-org / hsd / lib / dns / key.js View on Github external
ttl: 10800,
  class: 'IN',
  type: 'DNSKEY',
  data: {
    flags: 256,
    protocol: 3,
    algorithm: 13,
    publicKey: ''
      + 'I5nPs6clFa1gnwn9IpVDGdJLfEONzgD1NcfuEwEIVuIoHdZGgvVblsLNbRO+'
      + 'spW3nQYHg92svhy1HOjTiFBIsQ=='
  }
});

// . DS 35215 13 2
// 7C50EA94A63AEECB65B510D1EAC1846C973A89D4AB292287D5A4D715136B57A3
exports.ds = dnssec.createDS(exports.ksk, dnssec.hashes.SHA256);

exports.signKSK = function signKSK(section, type) {
  return dnssec.signType(section, type, exports.ksk, exports.kskPriv);
};

exports.signZSK = function signZSK(section, type) {
  return dnssec.signType(section, type, exports.zsk, exports.zskPriv);
};