com.crionics.jpdf.encryption
Class CertificateCredentialsCreation

java.lang.Object
  extended by com.crionics.jpdf.encryption.CertificateCredentials
      extended by com.crionics.jpdf.encryption.CertificateCredentialsCreation
All Implemented Interfaces:
ICredentials, ICredentialsCreation

public final class CertificateCredentialsCreation
extends CertificateCredentials
implements ICredentialsCreation

This credential class is used to protect documents based on certificate security. The author privatekey must be passed to the constructor, you can then use the method addCredential to add content readers.


Constructor Summary
CertificateCredentialsCreation(java.security.PrivateKey authorPrivateKey, java.security.cert.Certificate certificate)
          Creates a new CertificateCredentialsCreation for the given author.
 
Method Summary
 void addCredential(java.security.cert.Certificate readerCertificate, Permissions permissions)
          Adds a document reader with the given permissions.
 
Methods inherited from class com.crionics.jpdf.encryption.CertificateCredentials
getCertificate, getCredentials
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.crionics.jpdf.encryption.ICredentialsCreation
getCredentials
 

Constructor Detail

CertificateCredentialsCreation

public CertificateCredentialsCreation(java.security.PrivateKey authorPrivateKey,
                                      java.security.cert.Certificate certificate)
                               throws PdfException
Creates a new CertificateCredentialsCreation for the given author. The author is given fill permissions.

Parameters:
authorPrivateKey - the author's private key
certificate - the author's certificate
Throws:
PdfException - issues with parameter validation
Method Detail

addCredential

public void addCredential(java.security.cert.Certificate readerCertificate,
                          Permissions permissions)
Adds a document reader with the given permissions.

Parameters:
readerCertificate - identity authorized to access the document contents
permissions - permissions associated with the identity, this entry is cloned


Copyright © 1999-2007 Crionics. All Rights Reserved.