question: public String encrypt ( String plainText , CharSequence password ) throws KeyCrypterException { try { byte [ ] plainTextAsBytes ; if ( plainText == null ) { plainTextAsBytes = new byte [ 0 ] ; } else { plainTextAsBytes = plainText . getBytes ( STRING_ENCODING ) ; } byte [ ] encryptedBytes = encrypt ( plainTextAsBytes , password ) ; byte [ ] encryptedBytesPlusSaltedText = concat ( openSSLSaltedBytes , encryptedBytes ) ; return Base64 . encodeBase64String ( encryptedBytesPlusSaltedText ) ; } catch ( Exception e ) { throw new KeyCrypterException ( "Could not encrypt string '" + plainText + "'" , e ) ; } }
target:  Password based encryption using AES - CBC 256 bits.