Package com.openstego.desktop
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 Summary
Fields Modifier and Type Field Description static StringALGO_AES128Constant for algorithm - AES128static StringALGO_AES256Constant for algorithm - AES256static StringALGO_DESConstant for algorithm - DES 
- 
Constructor Summary
Constructors Constructor Description OpenStegoCrypto(String password, String algorithm)Default constructor 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]decrypt(byte[] input)Method to decrypt the databyte[]encrypt(byte[] input)Method to encrypt the data 
 - 
 
- 
- 
Field Detail
- 
ALGO_DES
public static final String ALGO_DES
Constant for algorithm - DES- See Also:
 - Constant Field Values
 
 
- 
ALGO_AES128
public static final String ALGO_AES128
Constant for algorithm - AES128- See Also:
 - Constant Field Values
 
 
- 
ALGO_AES256
public static final String ALGO_AES256
Constant for algorithm - AES256- See Also:
 - Constant Field Values
 
 
 - 
 
- 
Constructor Detail
- 
OpenStegoCrypto
public OpenStegoCrypto(String password, String algorithm) throws OpenStegoException
Default constructor- Parameters:
 password- Password to use for encryptionalgorithm- 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 OpenStegoExceptionMethod to encrypt the data- Parameters:
 input- Data to be encrypted- Returns:
 - Encrypted data
 - Throws:
 OpenStegoException- Processing issues
 
- 
decrypt
public byte[] decrypt(byte[] input) throws OpenStegoExceptionMethod to decrypt the data- Parameters:
 input- Data to be decrypted- Returns:
 - Decrypted data (returns 
nullif password is invalid) - Throws:
 OpenStegoException- Processing issues
 
 - 
 
 -