sasecurity.com/rsalabs/node.asp?id=2127" target="_blank">PKCS #5: Password-Based Cryptography Standard.
This encryptor uses a salt for each encryption operation. The size of the salt depends on the algorithm being used. This salt is used for creating the encryption key and, if generated by a random generator, it is also appended unencrypted at the beginning of the results so that a decryption operation can be performed.
If a random salt generator is used, two encryption results for the same message will always be different (except in the case of random salt coincidence). This may enforce security by difficulting brute force attacks on sets of data at a time and forcing attackers to perform a brute force attack on each separate piece of encrypted data.
@param message the String message to be encrypted
@return the result of encryption
@throws EncryptionOperationNotPossibleException if the encryption operation fails, ommitting any further information about the cause for security reasons.
@throws EncryptionInitializationException if initialization could notbe correctly done (for example, no password has been set).