Class OpenStegoCrypto


  • public class OpenStegoCrypto
    extends Object
    This is the class for providing cryptography support to OpenStego.
    • Constructor Detail

      • OpenStegoCrypto

        public OpenStegoCrypto​(String password,
                               String algorithm)
                        throws OpenStegoException
        Default constructor
        Parameters:
        password - Password to use for encryption
        algorithm - Cryptography algorithm to use. If null or blank value is provided, then it defaults to AES128
        Throws:
        OpenStegoException - Processing issues
    • Method Detail

      • encrypt

        public byte[] encrypt​(byte[] input)
                       throws OpenStegoException
        Method to encrypt the data
        Parameters:
        input - Data to be encrypted
        Returns:
        Encrypted data
        Throws:
        OpenStegoException - Processing issues
      • decrypt

        public byte[] decrypt​(byte[] input)
                       throws OpenStegoException
        Method to decrypt the data
        Parameters:
        input - Data to be decrypted
        Returns:
        Decrypted data (returns null if password is invalid)
        Throws:
        OpenStegoException - Processing issues