org.cert.cc.encryption
Class AbstractPGPProcessor<R>

java.lang.Object
  extended by org.cert.cc.encryption.AbstractProcessor
      extended by org.cert.cc.encryption.AbstractPGPProcessor<R>
Direct Known Subclasses:
MessagePGPProcessor, PartPGPProcessor, PGPEncryptedEmailBodyProcessor

public abstract class AbstractPGPProcessor<R>
extends AbstractProcessor

AbstractPGPProcessor is the base class for PGP/GPG decryption.

© 2009 Carnegie Mellon University

Author:
Steve Scholnick

Field Summary
 
Fields inherited from class org.cert.cc.encryption.AbstractProcessor
log
 
Constructor Summary
AbstractPGPProcessor()
           
 
Method Summary
protected abstract  R extractData(PGPLiteralData data)
          Returns the clear data extracted from the PGPLiteralData
protected  R process(byte[] data)
          Transforms raw encrypted data (a byte array) into generic object specified by a sub-class.
 
Methods inherited from class org.cert.cc.encryption.AbstractProcessor
getApplicationProperty, getPassword, getSecretsProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractPGPProcessor

public AbstractPGPProcessor()
Method Detail

extractData

protected abstract R extractData(PGPLiteralData data)
                          throws IOException
Returns the clear data extracted from the PGPLiteralData

Parameters:
data - PGPLiteralData data
Returns:
Clear data
Throws:
IOException - If unable to extract the clear data

process

protected final R process(byte[] data)
                   throws IOException,
                          PGPException,
                          NoSuchProviderException
Transforms raw encrypted data (a byte array) into generic object specified by a sub-class.

Parameters:
data - Data to be transformed
Returns:
Generic object (of type R)
Throws:
IOException - If unable to decrypt the data
PGPException - If unable to decrypt the data
NoSuchProviderException - If unable to decrypt the data


Copyright © 2012 Carnegie Mellon University