Class GPG
- java.lang.Object
-
- org.pentaho.di.job.entries.pgpencryptfiles.GPG
-
public class GPG extends Object
This defines a GnuPG wrapper class.- Since:
- 25-02-2011
- Author:
- Samatar
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringdecrypt(String cryptedText, String passPhrase)Decrypt a stringvoiddecryptFile(String cryptedFilename, String passPhrase, String decryptedFilename)Decrypt a filevoiddecryptFile(org.apache.commons.vfs2.FileObject cryptedFilename, String passPhrase, org.apache.commons.vfs2.FileObject decryptedFilename)Decrypt a fileStringencrypt(String plainText, String keyID)Encrypt a stringvoidencryptFile(String filename, String userID, String cryptedFilename, boolean asciiMode)Encrypt a filevoidencryptFile(org.apache.commons.vfs2.FileObject filename, String userID, org.apache.commons.vfs2.FileObject cryptedFilename, boolean asciiMode)Encrypt a fileStringgetGpgExeFile()Returns GPG program locationStringsign(String stringToSign, String passPhrase)SignStringsignAndEncrypt(String plainText, String userID, String passPhrase)Signs and encrypts a stringvoidsignAndEncryptFile(String filename, String userID, String cryptedFilename, boolean asciiMode)Sign and encrypt a filevoidsignAndEncryptFile(org.apache.commons.vfs2.FileObject file, String userID, org.apache.commons.vfs2.FileObject cryptedFile, boolean asciiMode)Sign and encrypt a filevoidsignFile(String filename, String userID, String signedFilename, boolean asciiMode)Sign a filevoidsignFile(org.apache.commons.vfs2.FileObject file, String userID, org.apache.commons.vfs2.FileObject signedFile, boolean asciiMode)Sign a fileStringtoString()voidverifyDetachedSignature(String signatureFilename, String originalFilename)Verify a signature for detached filevoidverifyDetachedSignature(org.apache.commons.vfs2.FileObject signatureFile, org.apache.commons.vfs2.FileObject originalFile)Verify a signature for detached filevoidverifySignature(String filename)Verify a signaturevoidverifySignature(org.apache.commons.vfs2.FileObject filename)Verify a signature
-
-
-
Constructor Detail
-
GPG
public GPG(String gpgFilename, org.pentaho.di.core.logging.LogChannelInterface logInterface) throws org.pentaho.di.core.exception.KettleException
Constructs a new GnuPG- Parameters:
gpgFilename- gpg program locationlogInterface- LogChannelInterface- Throws:
org.pentaho.di.core.exception.KettleException
-
-
Method Detail
-
getGpgExeFile
public String getGpgExeFile()
Returns GPG program location- Returns:
- GPG filename
-
decryptFile
public void decryptFile(org.apache.commons.vfs2.FileObject cryptedFilename, String passPhrase, org.apache.commons.vfs2.FileObject decryptedFilename) throws org.pentaho.di.core.exception.KettleExceptionDecrypt a file- Parameters:
cryptedFilename- crypted filenamepassPhrase- passphrase for the personal private key to sign withdecryptedFilename- decrypted filename- Throws:
org.pentaho.di.core.exception.KettleException
-
decryptFile
public void decryptFile(String cryptedFilename, String passPhrase, String decryptedFilename) throws org.pentaho.di.core.exception.KettleException
Decrypt a file- Parameters:
cryptedFilename- crypted filenamepassPhrase- passphrase for the personal private key to sign withdecryptedFilename- decrypted filename- Throws:
org.pentaho.di.core.exception.KettleException
-
encryptFile
public void encryptFile(org.apache.commons.vfs2.FileObject filename, String userID, org.apache.commons.vfs2.FileObject cryptedFilename, boolean asciiMode) throws org.pentaho.di.core.exception.KettleExceptionEncrypt a file- Parameters:
filename- file to encryptuserID- specific user id keycryptedFilename- crypted filenameasciiMode- output ASCII file- Throws:
org.pentaho.di.core.exception.KettleException
-
encryptFile
public void encryptFile(String filename, String userID, String cryptedFilename, boolean asciiMode) throws org.pentaho.di.core.exception.KettleException
Encrypt a file- Parameters:
filename- file to encryptuserID- specific user id keycryptedFilename- crypted filenameasciiMode- output ASCII file- Throws:
org.pentaho.di.core.exception.KettleException
-
signAndEncryptFile
public void signAndEncryptFile(org.apache.commons.vfs2.FileObject file, String userID, org.apache.commons.vfs2.FileObject cryptedFile, boolean asciiMode) throws org.pentaho.di.core.exception.KettleExceptionSign and encrypt a file- Parameters:
file- file to encryptuserID- specific user id keycryptedFile- crypted filenameasciiMode- output ASCII file- Throws:
org.pentaho.di.core.exception.KettleException
-
signAndEncryptFile
public void signAndEncryptFile(String filename, String userID, String cryptedFilename, boolean asciiMode) throws org.pentaho.di.core.exception.KettleException
Sign and encrypt a file- Parameters:
filename- file to encryptuserID- specific user id keycryptedFilename- crypted filenameasciiMode- output ASCII file- Throws:
org.pentaho.di.core.exception.KettleException
-
signFile
public void signFile(String filename, String userID, String signedFilename, boolean asciiMode) throws org.pentaho.di.core.exception.KettleException
Sign a file- Parameters:
filename- file to encryptuserID- specific user id keycryptedFilename- crypted filenameasciiMode- output ASCII file- Throws:
org.pentaho.di.core.exception.KettleException
-
signFile
public void signFile(org.apache.commons.vfs2.FileObject file, String userID, org.apache.commons.vfs2.FileObject signedFile, boolean asciiMode) throws org.pentaho.di.core.exception.KettleExceptionSign a file- Parameters:
file- file to encryptuserID- specific user id keysignedFile- crypted filenameasciiMode- output ASCII file- Throws:
org.pentaho.di.core.exception.KettleException
-
verifySignature
public void verifySignature(org.apache.commons.vfs2.FileObject filename) throws org.pentaho.di.core.exception.KettleExceptionVerify a signature- Parameters:
filename- filename- Throws:
org.pentaho.di.core.exception.KettleException
-
verifySignature
public void verifySignature(String filename) throws org.pentaho.di.core.exception.KettleException
Verify a signature- Parameters:
filename- filename- Throws:
org.pentaho.di.core.exception.KettleException
-
verifyDetachedSignature
public void verifyDetachedSignature(String signatureFilename, String originalFilename) throws org.pentaho.di.core.exception.KettleException
Verify a signature for detached file- Parameters:
signatureFilename- filenameoriginalFilenamefill- this value in case of detached signature- Throws:
org.pentaho.di.core.exception.KettleException
-
verifyDetachedSignature
public void verifyDetachedSignature(org.apache.commons.vfs2.FileObject signatureFile, org.apache.commons.vfs2.FileObject originalFile) throws org.pentaho.di.core.exception.KettleExceptionVerify a signature for detached file- Parameters:
signatureFile- filenameoriginalFile- fill this value in case of detached signature- Throws:
org.pentaho.di.core.exception.KettleException
-
encrypt
public String encrypt(String plainText, String keyID) throws org.pentaho.di.core.exception.KettleException
Encrypt a string- Parameters:
plainText- input string to encryptkeyID- key ID of the key in GnuPG's key database to encrypt with- Returns:
- encrypted string
- Throws:
org.pentaho.di.core.exception.KettleException
-
signAndEncrypt
public String signAndEncrypt(String plainText, String userID, String passPhrase) throws org.pentaho.di.core.exception.KettleException
Signs and encrypts a string- Parameters:
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 with- Returns:
- encrypted string
- Throws:
org.pentaho.di.core.exception.KettleException
-
sign
public String sign(String stringToSign, String passPhrase) throws org.pentaho.di.core.exception.KettleException
Sign- Parameters:
stringToSign- input string to signpassPhrase- passphrase for the personal private key to sign with- Throws:
org.pentaho.di.core.exception.KettleException
-
decrypt
public String decrypt(String cryptedText, String passPhrase) throws org.pentaho.di.core.exception.KettleException
Decrypt a string- Parameters:
cryptedText- input string to decryptpassPhrase- passphrase for the personal private key to sign with- Returns:
- plain text
- Throws:
org.pentaho.di.core.exception.KettleException
-
-