public void initialize(String key,String salt) throws IllegalArgumentException, NoSuchAlgorithmException {
  if (!isValidArgKey(key)) {
    throw new IllegalArgumentException(INIT_ILLEGAL_ARG_KEY);
  }
 else {
    this.key=key;
  }
  if (!isValidArg(salt)) {
    throw new IllegalArgumentException(INIT_ILLEGAL_ARG_SALT);
  }
 else {
    this.salt=hexStringToByteArray(salt);
  }
  this.iv=new byte[16];
  secureRandom=SecureRandom.getInstance(SECURE_RANDOM_ALGORITHM);
  ivParameterSpec=new IvParameterSpec(this.iv);
}

public void initialize ( String key , String salt ) throws IllegalArgumentException , NoSuchAlgorithmException { if ( ! isValidArgKey ( key ) ) { throw new IllegalArgumentException ( INIT_ILLEGAL_ARG_KEY ) ; } else { this . key = key ; } if ( ! isValidArg ( salt ) ) { throw new IllegalArgumentException ( INIT_ILLEGAL_ARG_SALT ) ; } else { this . salt = hexStringToByteArray ( salt ) ; } this . iv = new byte [ 16 ] ; secureRandom = SecureRandom . getInstance ( SECURE_RANDOM_ALGORITHM ) ; ivParameterSpec = new IvParameterSpec ( this . iv ) ; }
initialization for securerandom , ivparamspec , key ( password ) and salt
