Package org.cfcc

Examples of org.cfcc.CryptoException


        String encrypted = null;
        try {
            byte[] ciphertext = OpenSSL.encrypt(ALGORITHM, default_key.toCharArray(), text_in.getBytes());
            encrypted = Crypto.prefix() + new String(ciphertext);
        } catch (IOException ex) {
            throw new CryptoException(ex.toString());
        } catch (GeneralSecurityException ex) {
            throw new CryptoException(ex.toString());
        }
        return encrypted;
    }
View Full Code Here


                without_prefix = encrypted_data;
            }
            byte[] cleartext = OpenSSL.decrypt(ALGORITHM, default_key.toCharArray(), without_prefix.getBytes());
            return new String(cleartext);
        } catch (IOException ex) {
            throw new CryptoException(ex.toString());
        } catch (GeneralSecurityException ex) {
            throw new CryptoException(ex.toString());
        }
    }
View Full Code Here

TOP

Related Classes of org.cfcc.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.