Package org.xbill.DNS
Class NSEC3Record
java.lang.Object
org.xbill.DNS.Record
org.xbill.DNS.NSEC3Record
- All Implemented Interfaces:
Serializable,Cloneable,Comparable<Record>
Next SECure name 3 - this record contains the next hashed name in an ordered list of hashed names
in the zone, and a set of types for which records exist for this name. The presence of this
record in a response signifies a negative response from a DNSSEC-signed zone.
This replaces the NSEC and NXT records, when used.
- Author:
- Brian Wellington, David Blacka
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionNSEC3Record(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. -
Method Summary
Modifier and TypeMethodDescriptionintgetFlags()Returns the flagsintReturns the hash algorithmintReturns the number of iterationsbyte[]getNext()Returns the next hashbyte[]getSalt()Returns the saltint[]getTypes()Returns the set of types defined for this namebyte[]Hashes a name with the parameters of this NSEC3 record.booleanhasType(int type) Returns whether a specific type is in the set of types.protected voidrdataFromString(Tokenizer st, Name origin) Converts the text format of an RR to the internal format - must be overridenprotected voidrrFromWire(DNSInput in) Converts the type-specific RR to wire format - must be overriddenprotected StringConverts rdata to a Stringprotected voidrrToWire(DNSOutput out, Compression c, boolean canonical) Converts the type-specific RR to wire format - must be overridden.Methods inherited from class org.xbill.DNS.Record
byteArrayFromString, byteArrayToString, compareTo, equals, fromString, fromString, fromWire, getAdditionalName, getDClass, getName, getRRsetType, getTTL, getType, hashCode, newRecord, newRecord, newRecord, newRecord, rdataToString, rdataToWireCanonical, sameRRset, sameRRset, toString, toWire, toWireCanonical, unknownToString, withName
-
Field Details
-
SHA1_DIGEST_ID
public static final int SHA1_DIGEST_ID- See Also:
-
-
Constructor Details
-
NSEC3Record
public 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.- Parameters:
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.
-
-
Method Details
-
rrFromWire
Description copied from class:RecordConverts the type-specific RR to wire format - must be overridden- Specified by:
rrFromWirein classRecord- Throws:
IOException
-
rrToWire
Description copied from class:RecordConverts the type-specific RR to wire format - must be overridden. -
rdataFromString
Description copied from class:RecordConverts the text format of an RR to the internal format - must be overriden- Specified by:
rdataFromStringin classRecord- Throws:
IOException
-
rrToString
Converts rdata to a String- Specified by:
rrToStringin classRecord
-
getHashAlgorithm
public int getHashAlgorithm()Returns the hash algorithm -
getFlags
public int getFlags()Returns the flags -
getIterations
public int getIterations()Returns the number of iterations -
getSalt
public byte[] getSalt()Returns the salt -
getNext
public byte[] getNext()Returns the next hash -
getTypes
public int[] getTypes()Returns the set of types defined for this name -
hasType
public boolean hasType(int type) Returns whether a specific type is in the set of types. -
hashName
Hashes a name with the parameters of this NSEC3 record.- Parameters:
name- The name to hash- Returns:
- The hashed version of the name
- Throws:
NoSuchAlgorithmException- The hash algorithm is unknown.
-