|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.camel.converter.crypto.PGPDataFormat
public class PGPDataFormat
PGPDataFormat
uses the bouncy castle
libraries to enable encryption and decryption in the PGP format.
Field Summary | |
---|---|
static String |
ENCRYPTION_KEY_RING
|
static String |
KEY_FILE_NAME
|
static String |
KEY_PASSWORD
|
static String |
KEY_USERID
|
static String |
SIGNATURE_KEY_FILE_NAME
|
static String |
SIGNATURE_KEY_PASSWORD
|
static String |
SIGNATURE_KEY_RING
|
static String |
SIGNATURE_KEY_USERID
|
Constructor Summary | |
---|---|
PGPDataFormat()
|
Method Summary | |
---|---|
protected org.bouncycastle.openpgp.PGPSignatureGenerator |
createSignatureGenerator(org.apache.camel.Exchange exchange,
OutputStream out)
|
protected byte[] |
findEncryptionKeyRing(org.apache.camel.Exchange exchange)
|
protected String |
findKeyFileName(org.apache.camel.Exchange exchange)
|
protected String |
findKeyPassword(org.apache.camel.Exchange exchange)
|
protected String |
findKeyUserid(org.apache.camel.Exchange exchange)
|
protected String |
findSignatureKeyFileName(org.apache.camel.Exchange exchange)
|
protected String |
findSignatureKeyPassword(org.apache.camel.Exchange exchange)
|
protected byte[] |
findSignatureKeyRing(org.apache.camel.Exchange exchange)
|
protected String |
findSignatureKeyUserid(org.apache.camel.Exchange exchange)
|
boolean |
getArmored()
|
byte[] |
getEncryptionKeyRing()
|
boolean |
getIntegrity()
|
String |
getKeyFileName()
|
String |
getKeyUserid()
|
String |
getPassword()
|
protected org.bouncycastle.openpgp.PGPOnePassSignature |
getSignature(org.apache.camel.Exchange exchange,
org.bouncycastle.openpgp.PGPOnePassSignatureList signatureList)
|
String |
getSignatureKeyFileName()
|
byte[] |
getSignatureKeyRing()
|
String |
getSignatureKeyUserid()
|
String |
getSignaturePassword()
|
void |
marshal(org.apache.camel.Exchange exchange,
Object graph,
OutputStream outputStream)
|
void |
setArmored(boolean armored)
Sets if the encrypted file should be written in ascii visible text |
void |
setEncryptionKeyRing(byte[] encryptionKeyRing)
|
void |
setIntegrity(boolean integrity)
Whether or not to add a integrity check/sign to the encrypted file |
void |
setKeyFileName(String keyFileName)
filename of the keyring that will be used, classpathResource |
void |
setKeyUserid(String keyUserid)
Userid of the key used to encrypt/decrypt |
void |
setPassword(String password)
Password used to open the private keyring |
void |
setSignatureKeyFileName(String signatureKeyFileName)
filename of the signature keyring that will be used, classpathResource |
void |
setSignatureKeyRing(byte[] signatureKeyRing)
|
void |
setSignatureKeyUserid(String signatureKeyUserid)
Userid of the signature key used to sign/verify |
void |
setSignaturePassword(String signaturePassword)
Password used to open the signature private keyring |
Object |
unmarshal(org.apache.camel.Exchange exchange,
InputStream encryptedStream)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String KEY_FILE_NAME
public static final String ENCRYPTION_KEY_RING
public static final String KEY_USERID
public static final String KEY_PASSWORD
public static final String SIGNATURE_KEY_FILE_NAME
public static final String SIGNATURE_KEY_RING
public static final String SIGNATURE_KEY_USERID
public static final String SIGNATURE_KEY_PASSWORD
Constructor Detail |
---|
public PGPDataFormat()
Method Detail |
---|
protected String findKeyFileName(org.apache.camel.Exchange exchange)
protected byte[] findEncryptionKeyRing(org.apache.camel.Exchange exchange)
protected String findKeyUserid(org.apache.camel.Exchange exchange)
protected String findKeyPassword(org.apache.camel.Exchange exchange)
protected String findSignatureKeyFileName(org.apache.camel.Exchange exchange)
protected byte[] findSignatureKeyRing(org.apache.camel.Exchange exchange)
protected String findSignatureKeyUserid(org.apache.camel.Exchange exchange)
protected String findSignatureKeyPassword(org.apache.camel.Exchange exchange)
public void marshal(org.apache.camel.Exchange exchange, Object graph, OutputStream outputStream) throws Exception
marshal
in interface org.apache.camel.spi.DataFormat
Exception
protected org.bouncycastle.openpgp.PGPSignatureGenerator createSignatureGenerator(org.apache.camel.Exchange exchange, OutputStream out) throws IOException, org.bouncycastle.openpgp.PGPException, NoSuchProviderException, NoSuchAlgorithmException
IOException
org.bouncycastle.openpgp.PGPException
NoSuchProviderException
NoSuchAlgorithmException
public Object unmarshal(org.apache.camel.Exchange exchange, InputStream encryptedStream) throws Exception
unmarshal
in interface org.apache.camel.spi.DataFormat
Exception
protected org.bouncycastle.openpgp.PGPOnePassSignature getSignature(org.apache.camel.Exchange exchange, org.bouncycastle.openpgp.PGPOnePassSignatureList signatureList) throws IOException, org.bouncycastle.openpgp.PGPException, NoSuchProviderException
IOException
org.bouncycastle.openpgp.PGPException
NoSuchProviderException
public void setArmored(boolean armored)
public boolean getArmored()
public void setIntegrity(boolean integrity)
public boolean getIntegrity()
public void setKeyUserid(String keyUserid)
public String getKeyUserid()
public void setKeyFileName(String keyFileName)
public String getKeyFileName()
public void setPassword(String password)
public String getPassword()
public void setSignatureKeyUserid(String signatureKeyUserid)
public String getSignatureKeyUserid()
public void setSignatureKeyFileName(String signatureKeyFileName)
public String getSignatureKeyFileName()
public void setSignaturePassword(String signaturePassword)
public String getSignaturePassword()
public byte[] getEncryptionKeyRing()
public void setEncryptionKeyRing(byte[] encryptionKeyRing)
public byte[] getSignatureKeyRing()
public void setSignatureKeyRing(byte[] signatureKeyRing)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |