Class OpenStegoCrypto

java.lang.Object
com.openstego.desktop.OpenStegoCrypto

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

  • Constructor Details

    • 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
  • Method Details

    • encrypt

      public byte[] encrypt(byte[] input) throws OpenStegoException
      Method to encrypt the data
      Parameters:
      input - Data to be encrypted
      Returns:
      Encrypted data
      Throws:
      OpenStegoException
    • 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