public class NSEC3Record extends Record
This replaces the NSEC and NXT records, when used.
Modifier and Type | Class and Description |
---|---|
static class |
NSEC3Record.Digest |
static class |
NSEC3Record.Flags |
Modifier and Type | Field and Description |
---|---|
private static base32 |
b32 |
private int |
flags |
private int |
hashAlg |
private int |
iterations |
private byte[] |
next |
private byte[] |
salt |
static int |
SHA1_DIGEST_ID |
private TypeBitmap |
types |
Constructor and Description |
---|
NSEC3Record() |
NSEC3Record(Name name,
int dclass,
long ttl,
int hashAlg,
int flags,
int iterations,
byte[] salt,
byte[] next,
int[] types)
Creates an NSEC3 record from the given data.
|
Modifier and Type | Method and Description |
---|---|
int |
getFlags()
Returns the flags
|
int |
getHashAlgorithm()
Returns the hash algorithm
|
int |
getIterations()
Returns the number of iterations
|
byte[] |
getNext()
Returns the next hash
|
byte[] |
getSalt()
Returns the salt
|
int[] |
getTypes()
Returns the set of types defined for this name
|
byte[] |
hashName(Name name)
Hashes a name with the parameters of this NSEC3 record.
|
(package private) static byte[] |
hashName(Name name,
int hashAlg,
int iterations,
byte[] salt) |
boolean |
hasType(int type)
Returns whether a specific type is in the set of types.
|
protected void |
rdataFromString(Tokenizer st,
Name origin)
Converts the text format of an RR to the internal format - must be overriden
|
protected void |
rrFromWire(DNSInput in)
Converts the type-specific RR to wire format - must be overridden
|
protected java.lang.String |
rrToString()
Converts rdata to a String
|
protected void |
rrToWire(DNSOutput out,
Compression c,
boolean canonical)
Converts the type-specific RR to wire format - must be overridden.
|
byteArrayFromString, byteArrayToString, checkByteArrayLength, checkName, checkU16, checkU32, checkU8, cloneRecord, compareTo, equals, fromString, fromString, fromWire, fromWire, fromWire, getAdditionalName, getDClass, getName, getRRsetType, getTTL, getType, hashCode, newRecord, newRecord, newRecord, newRecord, rdataToString, rdataToWireCanonical, sameRRset, sameRRset, setTTL, toString, toWire, toWire, toWireCanonical, unknownToString, withDClass, withName, writeReplace
public static final int SHA1_DIGEST_ID
private int hashAlg
private int flags
private int iterations
private byte[] salt
private byte[] next
private TypeBitmap types
private static final base32 b32
NSEC3Record()
public NSEC3Record(Name name, int dclass, long ttl, int hashAlg, int flags, int iterations, byte[] salt, byte[] next, int[] types)
name
- The ownername of the NSEC3 record (base32'd hash plus zonename).dclass
- The class.ttl
- The TTL.hashAlg
- The hash algorithm.flags
- The value of the flags field.iterations
- The number of hash iterations.salt
- The salt to use (may be null).next
- The next hash (may not be null).types
- The types present at the original ownername.protected void rrFromWire(DNSInput in) throws java.io.IOException
Record
rrFromWire
in class Record
java.io.IOException
protected void rrToWire(DNSOutput out, Compression c, boolean canonical)
Record
protected void rdataFromString(Tokenizer st, Name origin) throws java.io.IOException
Record
rdataFromString
in class Record
java.io.IOException
protected java.lang.String rrToString()
rrToString
in class Record
public int getHashAlgorithm()
public int getFlags()
public int getIterations()
public byte[] getSalt()
public byte[] getNext()
public int[] getTypes()
public boolean hasType(int type)
static byte[] hashName(Name name, int hashAlg, int iterations, byte[] salt) throws java.security.NoSuchAlgorithmException
java.security.NoSuchAlgorithmException
public byte[] hashName(Name name) throws java.security.NoSuchAlgorithmException
name
- The name to hashjava.security.NoSuchAlgorithmException
- The hash algorithm is unknown.