handouts/ho01.tex
changeset 176 5336ad2fd3fa
parent 175 4ebc97e6fdf0
child 177 46e581d66f3a
equal deleted inserted replaced
175:4ebc97e6fdf0 176:5336ad2fd3fa
   307 possible combinations.
   307 possible combinations.
   308 
   308 
   309 
   309 
   310 There is one ingredient missing, which happens to be called
   310 There is one ingredient missing, which happens to be called
   311 \emph{salt}. The salt is a random key, which is added to the
   311 \emph{salt}. The salt is a random key, which is added to the
   312 counter before the hash is calculated. In our case we need
   312 counter before the hash is calculated. In our case we need to
   313 to keep the salt secrete.  
   313 keep the salt secret. As can be see from 
       
   314 Figure~\ref{hashsalt},
       
   315 we now need to extract the cookie data (Line 20). When we 
       
   316 set the new increased cookie, we will add the salt before 
       
   317 hashing (this is done in Line 13). 
   314 
   318 
   315 \begin{figure}[p]
   319 \begin{figure}[p]
   316 \lstinputlisting{../progs/App3.js}
   320 \lstinputlisting{../progs/App3.js}
       
   321 \caption{\label{hashsalt}}
   317 \end{figure}
   322 \end{figure}
   318 
   323 
   319 
   324 
   320 
   325 
   321 
   326