I have an algorithm dealing with some very large parameter names, messing up the readability. What I've done so far is break the lines of the problematic statement (lines 4-5) manually into two separate statements. Without it the statement will go outside the page margins. The procedure signature wraps itself.
What I want to do is to indent the overflowing lines in both the procedure name and the long statement to the location of the arrows in the figure above.
How should I do this? I am open for suggestions to other packages for algorithms as well.
\documentclass[12pt,a4paper,english,twoside,titlepage]{report}
\usepackage{algorithm}
\usepackage{algpseudocode}
\begin{document}
\begin{algorithm}
\caption{This procedure calculates the \texttt{response} value}
\begin{algorithmic}[1]
\Procedure {CalculateResponse}{$pszMethod$, $pszDigestUri$, $pszQop$, $pszUsername$, $pszRealm$, $pszPassword$, $pszNonce$, $pszCNonce$, $pszNonceCount$}
\State $ha1 \gets DigestCalcHA1(pszUsername, pszRealm, pszPassword)$
\State $ha2 \gets DigestCalcHA2(pszMethod, pszDigestUri, pszQop)$
\State $response \gets calculateResponse(ha1, ha2,pszMethod, pszDigestUri,$
\State $pszQop,pszNonce, pszNonceCount, pszCNonce)$
\EndProcedure
\Statex
\end{algorithmic}
\end{algorithm}
\end{document}