byte -> int for NSEC3 digest type.

This commit is contained in:
David Blacka 2012-05-26 14:42:44 -04:00
parent b18a96cbfc
commit 2a90a6ccd9
2 changed files with 6 additions and 6 deletions

View File

@ -45,7 +45,7 @@ import org.xbill.DNS.utils.base32;
public class ProtoNSEC3 public class ProtoNSEC3
{ {
private Name originalOwner; private Name originalOwner;
private byte hashAlg; private int hashAlg;
private byte flags; private byte flags;
private int iterations; private int iterations;
private byte[] salt; private byte[] salt;
@ -63,7 +63,7 @@ public class ProtoNSEC3
* Creates an NSEC3 Record from the given data. * Creates an NSEC3 Record from the given data.
*/ */
public ProtoNSEC3(byte[] owner, Name originalOwner, Name zone, int dclass, long ttl, public ProtoNSEC3(byte[] owner, Name originalOwner, Name zone, int dclass, long ttl,
byte hashAlg, byte flags, int iterations, byte[] salt, byte[] next, int hashAlg, byte flags, int iterations, byte[] salt, byte[] next,
TypeMap typemap) TypeMap typemap)
{ {
this.zone = zone; this.zone = zone;
@ -80,7 +80,7 @@ public class ProtoNSEC3
} }
public ProtoNSEC3(byte[] owner, Name originalOwner, Name zone, int dclass, long ttl, public ProtoNSEC3(byte[] owner, Name originalOwner, Name zone, int dclass, long ttl,
byte hashAlg, byte flags, int iterations, byte[] salt, byte[] next, int hashAlg, byte flags, int iterations, byte[] salt, byte[] next,
int[] types) int[] types)
{ {
this(owner, originalOwner, zone, dclass, ttl, hashAlg, flags, iterations, salt, next, this(owner, originalOwner, zone, dclass, ttl, hashAlg, flags, iterations, salt, next,
@ -168,7 +168,7 @@ public class ProtoNSEC3
return dclass; return dclass;
} }
public byte getHashAlgorithm() public int getHashAlgorithm()
{ {
return hashAlg; return hashAlg;
} }

View File

@ -1430,7 +1430,7 @@ public class SignUtils
* @throws NoSuchAlgorithmException * @throws NoSuchAlgorithmException
* If the hash algorithm is unrecognized. * If the hash algorithm is unrecognized.
*/ */
public static byte[] nsec3hash(Name n, byte hash_algorithm, int iterations, byte[] salt) public static byte[] nsec3hash(Name n, int hash_algorithm, int iterations, byte[] salt)
throws NoSuchAlgorithmException throws NoSuchAlgorithmException
{ {
MessageDigest md; MessageDigest md;