|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.xbill.DNS.TSIG
Transaction signature handling. This class generates and verifies TSIG records on messages, which provide transaction security.
TSIGRecord
Nested Class Summary | |
static class |
TSIG.StreamVerifier
|
Field Summary | |
static short |
FUDGE
The default fudge value for outgoing packets. |
static Name |
HMAC
The domain name representing the HMAC-MD5 algorithm (the only supported algorithm) |
Constructor Summary | |
TSIG(Name name,
byte[] key)
Creates a new TSIG object, which can be used to sign or verify a message. |
|
TSIG(String name,
String key)
Creates a new TSIG object, which can be used to sign or verify a message. |
Method Summary | |
void |
apply(Message m,
byte error,
TSIGRecord old)
Generates a TSIG record with a specific error for a message and adds it to the message. |
void |
apply(Message m,
TSIGRecord old)
Generates a TSIG record for a message and adds it to the message |
void |
applyStream(Message m,
TSIGRecord old,
boolean first)
Generates a TSIG record for a message and adds it to the message |
TSIGRecord |
generate(Message m,
byte[] b,
byte error,
TSIGRecord old)
Generates a TSIG record with a specific error for a message that has been rendered. |
int |
recordLength()
Returns the maximum length of a TSIG record generated by this key. |
byte |
verify(Message m,
byte[] b,
int length,
TSIGRecord old)
Verifies a TSIG record on an incoming message. |
byte |
verify(Message m,
byte[] b,
TSIGRecord old)
Verifies a TSIG record on an incoming message. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final Name HMAC
public static final short FUDGE
Constructor Detail |
public TSIG(Name name, byte[] key)
name
- The name of the shared keykey
- The shared key's datapublic TSIG(String name, String key)
name
- The name of the shared keykey
- The shared key's data, represented as either a base64 encoded
string or (if the first character is ':') a hex encoded string
IllegalArgumentException
- The key name is an invalid name
IllegalArgumentException
- The key data is improperly encodedMethod Detail |
public TSIGRecord generate(Message m, byte[] b, byte error, TSIGRecord old)
m
- The messageb
- The rendered messageerror
- The errorold
- If this message is a response, the TSIG from the request
public void apply(Message m, byte error, TSIGRecord old)
m
- The messageerror
- The errorold
- If this message is a response, the TSIG from the requestpublic void apply(Message m, TSIGRecord old)
m
- The messageold
- If this message is a response, the TSIG from the requestpublic void applyStream(Message m, TSIGRecord old, boolean first)
m
- The messageold
- If this message is a response, the TSIG from the requestpublic byte verify(Message m, byte[] b, int length, TSIGRecord old)
m
- The messageb
- An array containing the message in unparsed form. This is
necessary since TSIG signs the message in wire format, and we can't
recreate the exact wire format (with the same name compression).length
- The length of the message in the array.old
- If this message is a response, the TSIG from the request
Rcode
public byte verify(Message m, byte[] b, TSIGRecord old)
m
- The messageb
- The message in unparsed form. This is necessary since TSIG
signs the message in wire format, and we can't recreate the exact wire
format (with the same name compression).old
- If this message is a response, the TSIG from the request
Rcode
public int recordLength()
TSIGRecord
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |