Package org.jitterbit.crypto

Examples of org.jitterbit.crypto.CryptoException


                    }
                }
            }
            return toLongArray(keyIDs);
        } catch (PGPException ex) {
            throw new CryptoException(ex.getMessage(), ex);
        } finally {
            KongaIoUtils.close(decoderStream);
        }
    }
View Full Code Here


            OutputStream cOut = cPk.open(encOut, bytes.length);
            cOut.write(bytes); // obtain the actual bytes from the compressed stream
            cOut.close();
            return encOut.toByteArray();
        } catch (NoSuchProviderException ex) {
            throw new CryptoException(ex.getMessage(), ex);
        } catch (PGPException ex) {
            throw new CryptoException(ex.getMessage(), ex);
        }
    }
View Full Code Here

            try {
                PGPPBEEncryptedData pbe = extractEncryptedData(encrypted);
                PGPLiteralData ld = extractLiteralData(pbe, passPhrase);
                return decryptLiteralData(ld);
            } catch (NoSuchProviderException ex) {
                throw new CryptoException(ex.getMessage(), ex);
            } catch (PGPException ex) {
                throw new CryptoException(ex.getMessage(), ex);
            }
        }
View Full Code Here

        public final byte[] run(byte[] input) throws CryptoException {
            try {
                prepareProcessor(processor);
                return processBytes(processor, input);
            } catch (Exception ex) {
                throw new CryptoException(ex);
            } finally {
                processor.close();
            }
        }
View Full Code Here

                    KongaIoUtils.close(keyData);
                }
            } else {
                throw new IllegalStateException("Must supply either a key ID or a user ID first");
            }
            throw new CryptoException("No matching key found in the provided key data");
        }
View Full Code Here

                                                    throws IOException, CryptoException {
        try {
            Worker worker = new Worker();
            return worker.goToWork(input, decryptionKey, keyPassword, verificationKey);
        } catch (SignatureException ex) {
            throw new CryptoException(ex);
        } catch (NoSuchProviderException ex) {
            throw new CryptoException(ex);
        } catch (PGPException ex) {
            throw new CryptoException(ex);
        }
    }
View Full Code Here

    public void decrypt(File encrypted, File output) throws IOException, CryptoException {
        try {
            BufferedBlockCipher cipher = createCipher(false);
            decryptFile(encrypted, output, cipher);
        } catch (InvalidCipherTextException ex) {
            throw new CryptoException(ex.getMessage(), ex);
        }
    }
View Full Code Here

    public byte[] decrypt(byte[] encrypted) throws IOException, CryptoException {
        try {
            BufferedBlockCipher cipher = createCipher(false);
            return decryptBytes(encrypted, cipher);
        } catch (InvalidCipherTextException ex) {
            throw new CryptoException(ex.getMessage(), ex);
        }
    }
View Full Code Here

    public void encrypt(File clearText, File output) throws IOException, CryptoException {
        try {
            BufferedBlockCipher cipher = createCipher(true);
            encryptFile(clearText, output, cipher);
        } catch (InvalidCipherTextException ex) {
            throw new CryptoException(ex.getMessage(), ex);
        }
    }
View Full Code Here

    public byte[] encrypt(byte[] clearText) throws IOException, CryptoException {
        try {
            BufferedBlockCipher cipher = createCipher(true);
            return encryptBytes(clearText, cipher);
        } catch (InvalidCipherTextException ex) {
            throw new CryptoException(ex.getMessage(), ex);
        }
    }
View Full Code Here

TOP

Related Classes of org.jitterbit.crypto.CryptoException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.