Java Doc for PDEncryptionDictionary.java in  » PDF » PDFBox-0.7.3 » org » pdfbox » pdmodel » encryption » 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 » PDF » PDFBox 0.7.3 » org.pdfbox.pdmodel.encryption 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.pdfbox.pdmodel.encryption.PDEncryptionDictionary

All known Subclasses:   org.pdfbox.pdmodel.encryption.PDStandardEncryption,
PDEncryptionDictionary
public class PDEncryptionDictionary (Code)
This class is a specialized view of the encryption dictionary of a PDF document. It contains a low level dictionary (COSDictionary) and provides the methods to manage its fields. The available fields are the ones who are involved by standard security handler and public key security handler.
author:
   Ben Litchfield
author:
   Benoit Guillon (benoit.guillon@snv.jussieu.fr)
version:
   $Revision: 1.7 $


Field Summary
final public static  intDEFAULT_LENGTH
     The default length for the encryption key.
final public static  StringDEFAULT_NAME
     The default security handler.
final public static  intDEFAULT_VERSION
     The default version, according to the PDF Reference.
final public static  intVERSION0_UNDOCUMENTED_UNSUPPORTED
     See PDF Reference 1.4 Table 3.13.
final public static  intVERSION1_40_BIT_ALGORITHM
     See PDF Reference 1.4 Table 3.13.
final public static  intVERSION2_VARIABLE_LENGTH_ALGORITHM
     See PDF Reference 1.4 Table 3.13.
final public static  intVERSION3_UNPUBLISHED_ALGORITHM
     See PDF Reference 1.4 Table 3.13.
final public static  intVERSION4_SECURITY_HANDLER
     See PDF Reference 1.4 Table 3.13.
protected  COSDictionaryencryptionDictionary
     COS encryption dictionary.

Constructor Summary
public  PDEncryptionDictionary()
     creates a new empty encryption dictionary.
public  PDEncryptionDictionary(COSDictionary d)
     creates a new encryption dictionary from the low level dictionary provided.

Method Summary
public  COSDictionarygetCOSDictionary()
     This will get the dictionary associated with this encryption dictionary.
public  StringgetFilter()
     Get the name of the filter.
public  intgetLength()
     This will return the Length entry of the encryption dictionary.

The length in bits for the encryption algorithm.
public  byte[]getOwnerKey()
     This will get the O entry in the standard encryption dictionary.
public  intgetPermissions()
     This will get the permissions bit mask.
public  COSStringgetRecipientStringAt(int i)
     returns the COSString contained in the Recipients field at position i.
public  intgetRecipientsLength()
     Returns the number of recipients contained in the Recipients field of the dictionary.
public  intgetRevision()
     This will return the R entry of the encryption dictionary.

See PDF Reference 1.4 Table 3.14.
public  byte[]getUserKey()
     This will get the U entry in the standard encryption dictionary.
public  intgetVersion()
     This will return the V entry of the encryption dictionary.

See PDF Reference 1.4 Table 3.13.
public  voidsetFilter(String filter)
     Sets the filter entry of the encryption dictionary.
public  voidsetLength(int length)
     This will set the number of bits to use for the encryption algorithm.
public  voidsetOwnerKey(byte[] o)
     This will set the O entry in the standard encryption dictionary.
public  voidsetPermissions(int permissions)
     This will set the permissions bit mask.
public  voidsetRecipients(byte[][] recipients)
     This will set the Recipients field of the dictionary.
public  voidsetRevision(int revision)
     This will set the R entry of the encryption dictionary.

See PDF Reference 1.4 Table 3.14.
public  voidsetSubFilter(String subfilter)
     Set the subfilter entry of the encryption dictionary.
public  voidsetUserKey(byte[] u)
     This will set the U entry in the standard encryption dictionary.
public  voidsetVersion(int version)
     This will set the V entry of the encryption dictionary.

See PDF Reference 1.4 Table 3.13.

Field Detail
DEFAULT_LENGTH
final public static int DEFAULT_LENGTH(Code)
The default length for the encryption key.



DEFAULT_NAME
final public static String DEFAULT_NAME(Code)
The default security handler.



DEFAULT_VERSION
final public static int DEFAULT_VERSION(Code)
The default version, according to the PDF Reference.



VERSION0_UNDOCUMENTED_UNSUPPORTED
final public static int VERSION0_UNDOCUMENTED_UNSUPPORTED(Code)
See PDF Reference 1.4 Table 3.13.



VERSION1_40_BIT_ALGORITHM
final public static int VERSION1_40_BIT_ALGORITHM(Code)
See PDF Reference 1.4 Table 3.13.



VERSION2_VARIABLE_LENGTH_ALGORITHM
final public static int VERSION2_VARIABLE_LENGTH_ALGORITHM(Code)
See PDF Reference 1.4 Table 3.13.



VERSION3_UNPUBLISHED_ALGORITHM
final public static int VERSION3_UNPUBLISHED_ALGORITHM(Code)
See PDF Reference 1.4 Table 3.13.



VERSION4_SECURITY_HANDLER
final public static int VERSION4_SECURITY_HANDLER(Code)
See PDF Reference 1.4 Table 3.13.



encryptionDictionary
protected COSDictionary encryptionDictionary(Code)
COS encryption dictionary.




Constructor Detail
PDEncryptionDictionary
public PDEncryptionDictionary()(Code)
creates a new empty encryption dictionary.



PDEncryptionDictionary
public PDEncryptionDictionary(COSDictionary d)(Code)
creates a new encryption dictionary from the low level dictionary provided.
Parameters:
  d - the low level dictionary that will be managed by the newly created object




Method Detail
getCOSDictionary
public COSDictionary getCOSDictionary()(Code)
This will get the dictionary associated with this encryption dictionary. The COS dictionary that this object wraps.



getFilter
public String getFilter()(Code)
Get the name of the filter. The filter name contained in this encryption dictionary.



getLength
public int getLength()(Code)
This will return the Length entry of the encryption dictionary.

The length in bits for the encryption algorithm. This will return a multiple of 8. The length in bits for the encryption algorithm



getOwnerKey
public byte[] getOwnerKey() throws IOException(Code)
This will get the O entry in the standard encryption dictionary. A 32 byte array or null if there is no owner key.
throws:
  IOException - If there is an error accessing the data.



getPermissions
public int getPermissions()(Code)
This will get the permissions bit mask. The permissions bit mask.



getRecipientStringAt
public COSString getRecipientStringAt(int i)(Code)
returns the COSString contained in the Recipients field at position i.
Parameters:
  i - the position in the Recipients field array. a COSString object containing information about the recipient number i.



getRecipientsLength
public int getRecipientsLength()(Code)
Returns the number of recipients contained in the Recipients field of the dictionary. the number of recipients contained in the Recipients field.



getRevision
public int getRevision()(Code)
This will return the R entry of the encryption dictionary.

See PDF Reference 1.4 Table 3.14. The encryption revision to use.



getUserKey
public byte[] getUserKey() throws IOException(Code)
This will get the U entry in the standard encryption dictionary. A 32 byte array or null if there is no user key.
throws:
  IOException - If there is an error accessing the data.



getVersion
public int getVersion()(Code)
This will return the V entry of the encryption dictionary.

See PDF Reference 1.4 Table 3.13. The encryption version to use.



setFilter
public void setFilter(String filter)(Code)
Sets the filter entry of the encryption dictionary.
Parameters:
  filter - The filter name.



setLength
public void setLength(int length)(Code)
This will set the number of bits to use for the encryption algorithm.
Parameters:
  length - The new key length.



setOwnerKey
public void setOwnerKey(byte[] o) throws IOException(Code)
This will set the O entry in the standard encryption dictionary.
Parameters:
  o - A 32 byte array or null if there is no owner key.
throws:
  IOException - If there is an error setting the data.



setPermissions
public void setPermissions(int permissions)(Code)
This will set the permissions bit mask.
Parameters:
  permissions - The new permissions bit mask



setRecipients
public void setRecipients(byte[][] recipients) throws IOException(Code)
This will set the Recipients field of the dictionary. This field contains an array of string.
Parameters:
  recipients - the array of bytes arrays to put in the Recipients field.
throws:
  IOException - If there is an error setting the data.



setRevision
public void setRevision(int revision)(Code)
This will set the R entry of the encryption dictionary.

See PDF Reference 1.4 Table 3.14.

Note: This value is used to decrypt the pdf document. If you change this when the document is encrypted then decryption will fail!.
Parameters:
  revision - The new encryption version.



setSubFilter
public void setSubFilter(String subfilter)(Code)
Set the subfilter entry of the encryption dictionary.
Parameters:
  subfilter - The value of the subfilter field.



setUserKey
public void setUserKey(byte[] u) throws IOException(Code)
This will set the U entry in the standard encryption dictionary.
Parameters:
  u - A 32 byte array.
throws:
  IOException - If there is an error setting the data.



setVersion
public void setVersion(int version)(Code)
This will set the V entry of the encryption dictionary.

See PDF Reference 1.4 Table 3.13.

Note: This value is used to decrypt the pdf document. If you change this when the document is encrypted then decryption will fail!.
Parameters:
  version - The new encryption version.



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.