public class GPG extends Object
| Constructor and Description |
|---|
GPG(String gpgFilename,
org.pentaho.di.core.logging.LogChannelInterface logInterface)
Constructs a new GnuPG
|
| Modifier and Type | Method and Description |
|---|---|
String |
decrypt(String cryptedText,
String passPhrase)
Decrypt a string
|
void |
decryptFile(org.apache.commons.vfs.FileObject cryptedFilename,
String passPhrase,
org.apache.commons.vfs.FileObject decryptedFilename)
Decrypt a file
|
void |
decryptFile(String cryptedFilename,
String passPhrase,
String decryptedFilename)
Decrypt a file
|
String |
encrypt(String plainText,
String keyID)
Encrypt a string
|
void |
encryptFile(org.apache.commons.vfs.FileObject filename,
String userID,
org.apache.commons.vfs.FileObject cryptedFilename,
boolean asciiMode)
Encrypt a file
|
void |
encryptFile(String filename,
String userID,
String cryptedFilename,
boolean asciiMode)
Encrypt a file
|
String |
getGpgExeFile()
Returns GPG program location
|
String |
sign(String stringToSign,
String passPhrase)
Sign
|
String |
signAndEncrypt(String plainText,
String userID,
String passPhrase)
Signs and encrypts a string
|
void |
signAndEncryptFile(org.apache.commons.vfs.FileObject file,
String userID,
org.apache.commons.vfs.FileObject cryptedFile,
boolean asciiMode)
Sign and encrypt a file
|
void |
signAndEncryptFile(String filename,
String userID,
String cryptedFilename,
boolean asciiMode)
Sign and encrypt a file
|
void |
signFile(org.apache.commons.vfs.FileObject file,
String userID,
org.apache.commons.vfs.FileObject signedFile,
boolean asciiMode)
Sign a file
|
void |
signFile(String filename,
String userID,
String signedFilename,
boolean asciiMode)
Sign a file
|
String |
toString() |
void |
verifyDetachedSignature(org.apache.commons.vfs.FileObject signatureFile,
org.apache.commons.vfs.FileObject originalFile)
Verify a signature for detached file
|
void |
verifyDetachedSignature(String signatureFilename,
String originalFilename)
Verify a signature for detached file
|
void |
verifySignature(org.apache.commons.vfs.FileObject filename)
Verify a signature
|
void |
verifySignature(String filename)
Verify a signature
|
public GPG(String gpgFilename, org.pentaho.di.core.logging.LogChannelInterface logInterface) throws org.pentaho.di.core.exception.KettleException
gpgFilename - gpg program locationlogInterface - LogChannelInterfaceorg.pentaho.di.core.exception.KettleExceptionpublic String getGpgExeFile()
public void decryptFile(org.apache.commons.vfs.FileObject cryptedFilename,
String passPhrase,
org.apache.commons.vfs.FileObject decryptedFilename)
throws org.pentaho.di.core.exception.KettleException
cryptedFilename - crypted filenamepassPhrase - passphrase for the personal private key to sign withdecryptedFilename - decrypted filenameorg.pentaho.di.core.exception.KettleExceptionpublic void decryptFile(String cryptedFilename, String passPhrase, String decryptedFilename) throws org.pentaho.di.core.exception.KettleException
cryptedFilename - crypted filenamepassPhrase - passphrase for the personal private key to sign withdecryptedFilename - decrypted filenameorg.pentaho.di.core.exception.KettleExceptionpublic void encryptFile(org.apache.commons.vfs.FileObject filename,
String userID,
org.apache.commons.vfs.FileObject cryptedFilename,
boolean asciiMode)
throws org.pentaho.di.core.exception.KettleException
filename - file to encryptuserID - specific user id keycryptedFilename - crypted filenameasciiMode - output ASCII fileorg.pentaho.di.core.exception.KettleExceptionpublic void encryptFile(String filename, String userID, String cryptedFilename, boolean asciiMode) throws org.pentaho.di.core.exception.KettleException
filename - file to encryptuserID - specific user id keycryptedFilename - crypted filenameasciiMode - output ASCII fileorg.pentaho.di.core.exception.KettleExceptionpublic void signAndEncryptFile(org.apache.commons.vfs.FileObject file,
String userID,
org.apache.commons.vfs.FileObject cryptedFile,
boolean asciiMode)
throws org.pentaho.di.core.exception.KettleException
file - file to encryptuserID - specific user id keycryptedFile - crypted filenameasciiMode - output ASCII fileorg.pentaho.di.core.exception.KettleExceptionpublic void signAndEncryptFile(String filename, String userID, String cryptedFilename, boolean asciiMode) throws org.pentaho.di.core.exception.KettleException
filename - file to encryptuserID - specific user id keycryptedFilename - crypted filenameasciiMode - output ASCII fileorg.pentaho.di.core.exception.KettleExceptionpublic void signFile(String filename, String userID, String signedFilename, boolean asciiMode) throws org.pentaho.di.core.exception.KettleException
filename - file to encryptuserID - specific user id keycryptedFilename - crypted filenameasciiMode - output ASCII fileorg.pentaho.di.core.exception.KettleExceptionpublic void signFile(org.apache.commons.vfs.FileObject file,
String userID,
org.apache.commons.vfs.FileObject signedFile,
boolean asciiMode)
throws org.pentaho.di.core.exception.KettleException
file - file to encryptuserID - specific user id keysignedFile - crypted filenameasciiMode - output ASCII fileorg.pentaho.di.core.exception.KettleExceptionpublic void verifySignature(org.apache.commons.vfs.FileObject filename)
throws org.pentaho.di.core.exception.KettleException
filename - filenameorg.pentaho.di.core.exception.KettleExceptionpublic void verifySignature(String filename) throws org.pentaho.di.core.exception.KettleException
filename - filenameorg.pentaho.di.core.exception.KettleExceptionpublic void verifyDetachedSignature(String signatureFilename, String originalFilename) throws org.pentaho.di.core.exception.KettleException
signatureFilename - filenameoriginalFilenamefill - this value in case of detached signatureorg.pentaho.di.core.exception.KettleExceptionpublic void verifyDetachedSignature(org.apache.commons.vfs.FileObject signatureFile,
org.apache.commons.vfs.FileObject originalFile)
throws org.pentaho.di.core.exception.KettleException
signatureFile - filenameoriginalFile - fill this value in case of detached signatureorg.pentaho.di.core.exception.KettleExceptionpublic String encrypt(String plainText, String keyID) throws org.pentaho.di.core.exception.KettleException
plainText - input string to encryptkeyID - key ID of the key in GnuPG's key database to encrypt withorg.pentaho.di.core.exception.KettleExceptionpublic String signAndEncrypt(String plainText, String userID, String passPhrase) throws org.pentaho.di.core.exception.KettleException
plainText - input string to encryptuserID - key ID of the key in GnuPG's key database to encrypt withpassPhrase - passphrase for the personal private key to sign withorg.pentaho.di.core.exception.KettleExceptionpublic String sign(String stringToSign, String passPhrase) throws org.pentaho.di.core.exception.KettleException
stringToSign - input string to signpassPhrase - passphrase for the personal private key to sign withorg.pentaho.di.core.exception.KettleExceptionpublic String decrypt(String cryptedText, String passPhrase) throws org.pentaho.di.core.exception.KettleException
cryptedText - input string to decryptpassPhrase - passphrase for the personal private key to sign withorg.pentaho.di.core.exception.KettleException