Java Doc for TSIG.java in  » Net » dnsjava » org » xbill » DNS » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Net » dnsjava » org.xbill.DNS 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.xbill.DNS.TSIG

TSIG
public class TSIG (Code)
Transaction signature handling. This class generates and verifies TSIG records on messages, which provide transaction security.
See Also:   TSIGRecord
author:
   Brian Wellington

Inner Class :public static class StreamVerifier

Field Summary
final public static  shortFUDGE
     The default fudge value for outgoing packets.
final public static  NameHMAC
     The domain name representing the HMAC-MD5 algorithm (deprecated).
final public static  NameHMAC_MD5
     The domain name representing the HMAC-MD5 algorithm.
final public static  NameHMAC_SHA1
     The domain name representing the HMAC-SHA1 algorithm.
final public static  NameHMAC_SHA256
     The domain name representing the HMAC-SHA256 algorithm.

Constructor Summary
public  TSIG(Name algorithm, Name name, byte[] key)
     Creates a new TSIG key, which can be used to sign or verify a message.
public  TSIG(Name name, byte[] key)
     Creates a new TSIG key with the hmac-md5 algorithm, which can be used to sign or verify a message.
public  TSIG(Name algorithm, String name, String key)
     Creates a new TSIG object, which can be used to sign or verify a message.
public  TSIG(String algorithm, String name, String key)
     Creates a new TSIG object, which can be used to sign or verify a message.
Parameters:
  name - The name of the shared key.
public  TSIG(String name, String key)
     Creates a new TSIG object with the hmac-md5 algorithm, which can be used to sign or verify a message.

Method Summary
public  voidapply(Message m, int error, TSIGRecord old)
     Generates a TSIG record with a specific error for a message and adds it to the message.
public  voidapply(Message m, TSIGRecord old)
    
public  voidapplyStream(Message m, TSIGRecord old, boolean first)
    
public static  TSIGfromString(String str)
     Creates a new TSIG object with the hmac-md5 algorithm, which can be used to sign or verify a message.
Parameters:
  str - The TSIG key, in the form name:secret, name/secret,alg:name:secret, or alg/name/secret.
public  TSIGRecordgenerate(Message m, byte[] b, int error, TSIGRecord old)
     Generates a TSIG record with a specific error for a message that has been rendered.
public  intrecordLength()
     Returns the maximum length of a TSIG record generated by this key.
public  byteverify(Message m, byte[] b, int length, TSIGRecord old)
     Verifies a TSIG record on an incoming message.
public  intverify(Message m, byte[] b, TSIGRecord old)
     Verifies a TSIG record on an incoming message.

Field Detail
FUDGE
final public static short FUDGE(Code)
The default fudge value for outgoing packets. Can be overriden by the tsigfudge option.



HMAC
final public static Name HMAC(Code)
The domain name representing the HMAC-MD5 algorithm (deprecated).



HMAC_MD5
final public static Name HMAC_MD5(Code)
The domain name representing the HMAC-MD5 algorithm.



HMAC_SHA1
final public static Name HMAC_SHA1(Code)
The domain name representing the HMAC-SHA1 algorithm.



HMAC_SHA256
final public static Name HMAC_SHA256(Code)
The domain name representing the HMAC-SHA256 algorithm.




Constructor Detail
TSIG
public TSIG(Name algorithm, Name name, byte[] key)(Code)
Creates a new TSIG key, which can be used to sign or verify a message.
Parameters:
  algorithm - The algorithm of the shared key.
Parameters:
  name - The name of the shared key.
Parameters:
  key - The shared key's data.



TSIG
public TSIG(Name name, byte[] key)(Code)
Creates a new TSIG key with the hmac-md5 algorithm, which can be used to sign or verify a message.
Parameters:
  name - The name of the shared key.
Parameters:
  key - The shared key's data.



TSIG
public TSIG(Name algorithm, String name, String key)(Code)
Creates a new TSIG object, which can be used to sign or verify a message.
Parameters:
  name - The name of the shared key.
Parameters:
  key - The shared key's data represented as a base64 encoded string.
throws:
  IllegalArgumentException - The key name is an invalid name
throws:
  IllegalArgumentException - The key data is improperly encoded



TSIG
public TSIG(String algorithm, String name, String key)(Code)
Creates a new TSIG object, which can be used to sign or verify a message.
Parameters:
  name - The name of the shared key. The legal values are "hmac-md5","hmac-sha1", and "hmac-sha256".
Parameters:
  key - The shared key's data represented as a base64 encoded string.
throws:
  IllegalArgumentException - The key name is an invalid name
throws:
  IllegalArgumentException - The key data is improperly encoded



TSIG
public TSIG(String name, String key)(Code)
Creates a new TSIG object with the hmac-md5 algorithm, which can be used to sign or verify a message.
Parameters:
  name - The name of the shared key
Parameters:
  key - The shared key's data, represented as a base64 encoded string.
throws:
  IllegalArgumentException - The key name is an invalid name
throws:
  IllegalArgumentException - The key data is improperly encoded




Method Detail
apply
public void apply(Message m, int error, TSIGRecord old)(Code)
Generates a TSIG record with a specific error for a message and adds it to the message.
Parameters:
  m - The message
Parameters:
  error - The error
Parameters:
  old - If this message is a response, the TSIG from the request



apply
public void apply(Message m, TSIGRecord old)(Code)
Generates a TSIG record for a message and adds it to the message
Parameters:
  m - The message
Parameters:
  old - If this message is a response, the TSIG from the request



applyStream
public void applyStream(Message m, TSIGRecord old, boolean first)(Code)
Generates a TSIG record for a message and adds it to the message
Parameters:
  m - The message
Parameters:
  old - If this message is a response, the TSIG from the request



fromString
public static TSIG fromString(String str)(Code)
Creates a new TSIG object with the hmac-md5 algorithm, which can be used to sign or verify a message.
Parameters:
  str - The TSIG key, in the form name:secret, name/secret,alg:name:secret, or alg/name/secret. If an algorithm is specified, it mustbe "hmac-md5", "hmac-sha1", or "hmac-sha256".
throws:
  IllegalArgumentException - The string does not contain both a nameand secret.
throws:
  IllegalArgumentException - The key name is an invalid name
throws:
  IllegalArgumentException - The key data is improperly encoded



generate
public TSIGRecord generate(Message m, byte[] b, int error, TSIGRecord old)(Code)
Generates a TSIG record with a specific error for a message that has been rendered.
Parameters:
  m - The message
Parameters:
  b - The rendered message
Parameters:
  error - The error
Parameters:
  old - If this message is a response, the TSIG from the request The TSIG record to be added to the message



recordLength
public int recordLength()(Code)
Returns the maximum length of a TSIG record generated by this key.
See Also:   TSIGRecord



verify
public byte verify(Message m, byte[] b, int length, TSIGRecord old)(Code)
Verifies a TSIG record on an incoming message. Since this is only called in the context where a TSIG is expected to be present, it is an error if one is not present.
Parameters:
  m - The message
Parameters:
  b - An array containing the message in unparsed form. This isnecessary since TSIG signs the message in wire format, and we can'trecreate the exact wire format (with the same name compression).
Parameters:
  length - The length of the message in the array.
Parameters:
  old - If this message is a response, the TSIG from the request The result of the verification (as an Rcode)
See Also:   Rcode



verify
public int verify(Message m, byte[] b, TSIGRecord old)(Code)
Verifies a TSIG record on an incoming message. Since this is only called in the context where a TSIG is expected to be present, it is an error if one is not present.
Parameters:
  m - The message
Parameters:
  b - The message in unparsed form. This is necessary since TSIGsigns the message in wire format, and we can't recreate the exact wireformat (with the same name compression).
Parameters:
  old - If this message is a response, the TSIG from the request The result of the verification (as an Rcode)
See Also:   Rcode



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.