Home | History | Annotate | Download | only in DNS

Lines Matching defs:HMAC

18 private static final String HMAC_MD5_STR = "HMAC-MD5.SIG-ALG.REG.INT.";
19 private static final String HMAC_SHA1_STR = "hmac-sha1.";
20 private static final String HMAC_SHA224_STR = "hmac-sha224.";
21 private static final String HMAC_SHA256_STR = "hmac-sha256.";
22 private static final String HMAC_SHA384_STR = "hmac-sha384.";
23 private static final String HMAC_SHA512_STR = "hmac-sha512.";
25 /** The domain name representing the HMAC-MD5 algorithm. */
28 /** The domain name representing the HMAC-MD5 algorithm (deprecated). */
29 public static final Name HMAC = HMAC_MD5;
31 /** The domain name representing the HMAC-SHA1 algorithm. */
35 * The domain name representing the HMAC-SHA224 algorithm.
41 /** The domain name representing the HMAC-SHA256 algorithm. */
44 /** The domain name representing the HMAC-SHA384 algorithm. */
47 /** The domain name representing the HMAC-SHA512 algorithm. */
100 * Creates a new TSIG key with the hmac-md5 algorithm, which can be used to
136 * "hmac-md5", "hmac-sha1", "hmac-sha224", "hmac-sha256", "hmac-sha384", and
137 * "hmac-sha512".
145 if (algorithm.equalsIgnoreCase("hmac-md5"))
147 else if (algorithm.equalsIgnoreCase("hmac-sha1"))
149 else if (algorithm.equalsIgnoreCase("hmac-sha224"))
151 else if (algorithm.equalsIgnoreCase("hmac-sha256"))
153 else if (algorithm.equalsIgnoreCase("hmac-sha384"))
155 else if (algorithm.equalsIgnoreCase("hmac-sha512"))
163 * Creates a new TSIG object with the hmac-md5 algorithm, which can be used to
179 * be "hmac-md5", "hmac-sha1", or "hmac-sha256".
218 HMAC hmac = null;
220 hmac = new HMAC(digest, digestBlockLength, key);
229 if (hmac != null) {
230 hmac.update(out.toByteArray());
231 hmac.update(old.getSignature());
236 if (hmac != null)
237 hmac.update(b);
254 if (hmac != null)
255 hmac.update(out.toByteArray());
258 if (hmac != null)
259 signature = hmac.sign();
315 HMAC hmac = new HMAC(digest, digestBlockLength, key);
323 hmac.update(out.toByteArray());
324 hmac.update(old.getSignature());
327 hmac.update(m.toWire());
337 hmac.update(out.toByteArray());
339 byte [] signature = hmac.sign();
367 HMAC hmac = new HMAC(digest, digestBlockLength, key);
390 hmac.update(out.toByteArray());
391 hmac.update(old.getSignature());
396 hmac.update(header);
399 hmac.update(b, header.length, len);
420 hmac.update(out.toByteArray());
423 int digestLength = hmac.digestLength();
434 } else if (!hmac.verify(signature, true)) {
482 private HMAC verifier;
491 verifier = new HMAC(key.digest, key.digestBlockLength, key.key);