Package org.xbill.DNS.utils

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


  if (old != null) {
    DNSOutput out = new DNSOutput();
    out.writeU16(old.getSignature().length);
    if (hmac != null) {
      hmac.update(out.toByteArray());
      hmac.update(old.getSignature());
    }
  }

  /* Digest the message */
 
View Full Code Here


  if (old != null) {
    DNSOutput out = new DNSOutput();
    out.writeU16(old.getSignature().length);
    if (hmac != null) {
      hmac.update(out.toByteArray());
      hmac.update(old.getSignature());
    }
  }

  /* Digest the message */
  if (hmac != null)
View Full Code Here

    }
  }

  /* Digest the message */
  if (hmac != null)
    hmac.update(b);

  DNSOutput out = new DNSOutput();
  name.toWireCanonical(out);
  out.writeU16(DClass.ANY)/* class */
  out.writeU32(0);    /* ttl */
 
View Full Code Here

  out.writeU16(error);
  out.writeU16(0); /* No other data */

  if (hmac != null)
    hmac.update(out.toByteArray());

  byte [] signature;
  if (hmac != null)
    signature = hmac.sign();
  else
View Full Code Here

  if (fudge < 0 || fudge > 0x7FFF)
    fudge = FUDGE;

  DNSOutput out = new DNSOutput();
  out.writeU16(old.getSignature().length);
  hmac.update(out.toByteArray());
  hmac.update(old.getSignature());

  /* Digest the message */
  hmac.update(m.toWire());

 
View Full Code Here

    fudge = FUDGE;

  DNSOutput out = new DNSOutput();
  out.writeU16(old.getSignature().length);
  hmac.update(out.toByteArray());
  hmac.update(old.getSignature());

  /* Digest the message */
  hmac.update(m.toWire());

  out = new DNSOutput();
View Full Code Here

  out.writeU16(old.getSignature().length);
  hmac.update(out.toByteArray());
  hmac.update(old.getSignature());

  /* Digest the message */
  hmac.update(m.toWire());

  out = new DNSOutput();
  long time = timeSigned.getTime() / 1000;
  int timeHigh = (int) (time >> 32);
  long timeLow = (time & 0xFFFFFFFFL);
View Full Code Here

  long timeLow = (time & 0xFFFFFFFFL);
  out.writeU16(timeHigh);
  out.writeU32(timeLow);
  out.writeU16(fudge);

  hmac.update(out.toByteArray());

  byte [] signature = hmac.sign();
  byte [] other = null;

  Record r = new TSIGRecord(name, DClass.ANY, 0, alg, timeSigned, fudge,
View Full Code Here

  if (old != null && tsig.getError() != Rcode.BADKEY &&
      tsig.getError() != Rcode.BADSIG)
  {
    DNSOutput out = new DNSOutput();
    out.writeU16(old.getSignature().length);
    hmac.update(out.toByteArray());
    hmac.update(old.getSignature());
  }
  m.getHeader().decCount(Section.ADDITIONAL);
  byte [] header = m.getHeader().toWire();
  m.getHeader().incCount(Section.ADDITIONAL);
View Full Code Here

      tsig.getError() != Rcode.BADSIG)
  {
    DNSOutput out = new DNSOutput();
    out.writeU16(old.getSignature().length);
    hmac.update(out.toByteArray());
    hmac.update(old.getSignature());
  }
  m.getHeader().decCount(Section.ADDITIONAL);
  byte [] header = m.getHeader().toWire();
  m.getHeader().incCount(Section.ADDITIONAL);
  hmac.update(header);
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.