Package org.xbill.DNS.utils

Examples of org.xbill.DNS.utils.HMAC.update()


    hmac.update(old.getSignature());
  }
  m.getHeader().decCount(Section.ADDITIONAL);
  byte [] header = m.getHeader().toWire();
  m.getHeader().incCount(Section.ADDITIONAL);
  hmac.update(header);

  int len = m.tsigstart - header.length; 
  hmac.update(b, header.length, len);

  DNSOutput out = new DNSOutput();
View Full Code Here


  byte [] header = m.getHeader().toWire();
  m.getHeader().incCount(Section.ADDITIONAL);
  hmac.update(header);

  int len = m.tsigstart - header.length; 
  hmac.update(b, header.length, len);

  DNSOutput out = new DNSOutput();
  tsig.getName().toWireCanonical(out);
  out.writeU16(tsig.dclass);
  out.writeU32(tsig.ttl);
View Full Code Here

    out.writeByteArray(tsig.getOther());
  } else {
    out.writeU16(0);
  }

  hmac.update(out.toByteArray());

  if (hmac.verify(tsig.getSignature())) {
    m.tsigState = Message.TSIG_VERIFIED;
    return Rcode.NOERROR;
  } else {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.