Java Doc for SecurityHandler.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.SecurityHandler

All known Subclasses:   org.pdfbox.pdmodel.encryption.StandardSecurityHandler,  org.pdfbox.pdmodel.encryption.PublicKeySecurityHandler,
SecurityHandler
abstract public class SecurityHandler (Code)
This class represents a security handler as described in the PDF specifications. A security handler is responsible of documents protection.
author:
   Ben Litchfield
author:
   Benoit Guillon (benoit.guillon@snv.jussieu.fr)
version:
   $Revision: 1.4 $


Field Summary
protected  AccessPermissioncurrentAccessPermission
     The access permission granted to the current user for the document.
protected  PDDocumentdocument
     The document whose security is handled by this security handler.
protected  byte[]encryptionKey
     The encryption key that will used to encrypt / decrypt.
protected  intkeyLength
     The length of the secret key used to encrypt the document.
protected  ARCFourrc4
     The RC4 implementation used for cryptographic functions.
protected  intversion
     The value of V field of the Encryption dictionary.


Method Summary
abstract public  voiddecryptDocument(PDDocument doc, DecryptionMaterial mat)
     Prepare the document for decryption.
public  voiddecryptStream(COSStream stream, long objNum, long genNum)
     This will decrypt a stream.
public  voiddecryptString(COSString string, long objNum, long genNum)
     This will decrypt a string.
public  voidencryptData(long objectNumber, long genNumber, InputStream data, OutputStream output)
     Encrypt a set of data.
public  AccessPermissiongetCurrentAccessPermission()
     Returns the access permissions that were computed during document decryption.
public  intgetKeyLength()
     Getter of the property keyLength.
abstract public  voidprepareDocumentForEncryption(PDDocument doc)
     Prepare the document for encryption.
protected  voidproceedDecryption()
     This method must be called by an implementation of this class to really proceed to decryption.
public  voidsetKeyLength(int keyLen)
     Setter of the property keyLength.

Field Detail
currentAccessPermission
protected AccessPermission currentAccessPermission(Code)
The access permission granted to the current user for the document. These permissions are computed during decryption and are in read only mode.



document
protected PDDocument document(Code)
The document whose security is handled by this security handler.



encryptionKey
protected byte[] encryptionKey(Code)
The encryption key that will used to encrypt / decrypt.



keyLength
protected int keyLength(Code)
The length of the secret key used to encrypt the document.



rc4
protected ARCFour rc4(Code)
The RC4 implementation used for cryptographic functions.



version
protected int version(Code)
The value of V field of the Encryption dictionary.





Method Detail
decryptDocument
abstract public void decryptDocument(PDDocument doc, DecryptionMaterial mat) throws CryptographyException, IOException(Code)
Prepare the document for decryption.
Parameters:
  doc - The document to decrypt.
Parameters:
  mat - Information required to decrypt the document.
throws:
  CryptographyException - If there is an error while preparing.
throws:
  IOException - If there is an error with the document.



decryptStream
public void decryptStream(COSStream stream, long objNum, long genNum) throws CryptographyException, IOException(Code)
This will decrypt a stream.
Parameters:
  stream - The stream to decrypt.
Parameters:
  objNum - The object number.
Parameters:
  genNum - The object generation number.
throws:
  CryptographyException - If there is an error getting the stream.
throws:
  IOException - If there is an error getting the stream data.



decryptString
public void decryptString(COSString string, long objNum, long genNum) throws CryptographyException, IOException(Code)
This will decrypt a string.
Parameters:
  string - the string to decrypt.
Parameters:
  objNum - The object number.
Parameters:
  genNum - The object generation number.
throws:
  CryptographyException - If an error occurs during decryption.
throws:
  IOException - If an error occurs writing the new string.



encryptData
public void encryptData(long objectNumber, long genNumber, InputStream data, OutputStream output) throws CryptographyException, IOException(Code)
Encrypt a set of data.
Parameters:
  objectNumber - The data object number.
Parameters:
  genNumber - The data generation number.
Parameters:
  data - The data to encrypt.
Parameters:
  output - The output to write the encrypted data to.
throws:
  CryptographyException - If there is an error during the encryption.
throws:
  IOException - If there is an error reading the data.



getCurrentAccessPermission
public AccessPermission getCurrentAccessPermission()(Code)
Returns the access permissions that were computed during document decryption. The returned object is in read only mode. the access permissions or null if the document was not decrypted.



getKeyLength
public int getKeyLength()(Code)
Getter of the property keyLength. Returns the keyLength.



prepareDocumentForEncryption
abstract public void prepareDocumentForEncryption(PDDocument doc) throws CryptographyException, IOException(Code)
Prepare the document for encryption.
Parameters:
  doc - The document that will be encrypted.
throws:
  CryptographyException - If there is an error while preparing.
throws:
  IOException - If there is an error with the document.



proceedDecryption
protected void proceedDecryption() throws IOException, CryptographyException(Code)
This method must be called by an implementation of this class to really proceed to decryption.
throws:
  IOException - If there is an error in the decryption.
throws:
  CryptographyException - If there is an error in the decryption.



setKeyLength
public void setKeyLength(int keyLen)(Code)
Setter of the property keyLength.
Parameters:
  keyLen - The keyLength to set.



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.