code: public InputStream decrypt(InputStream source, String password) throws IOException {
  
          // Remove the initialisation vector from the start of the stream.
          // NB if the stream is empty, the read will return -1 and no harm will
          // be done.
          byte[] salt = new byte[Generate.SALT_BYTES];
  
          // THe key generation salt can be stored unencrypted at the start of the stream:
          source.read(salt);
  
          // Generate the key:
          SecretKey key = Keys.generateSecretKey(password, ByteArray.toBase64(salt));
  
          // Return the initialised stream:
          return decrypt(source, key);
      }
docs: This method wraps the source {@link InputStream} with a
  {@link CipherInputStream}.
  <p>
  Typical usage is when you have an InputStream for a source of encrypted
  data on disk, and an OutputStream to send the file to an HTTP response.
  You would call this method to wrap the InputStream and use the returned
  {@link CipherInputStream} to read the data from instead so that it is
  decrypted as it is read and can be written to the response unencrypted.
  <p>
  Note that this method reads and discards a salt value and the random
  initialisation vector from the source InputStream, so the source
  parameter will have some bytes read from it before this method returns.
  These bytes are necessary for initialising decryption and the call to
  {@link #encrypt(OutputStream, String)} will have added these to the start
  of the underlying data automatically.
  
  @param source   The source {@link InputStream}, containing encrypted data.
  @param password The password to be used for decryption.
  @return A {@link CipherInputStream}, which wraps the given source stream
  and will decrypt the data as they are read.
  @throws IOException              If an error occurs in reading the initialisation vector from
  the source stream.
  @throws IllegalArgumentException If the given key is not a valid {@value #CIPHER_ALGORITHM}
  key.
  @see #encrypt(OutputStream, String)