Why doesn't the read function work in sha1 c++ implementation? : <p>I found this c++ implementation of SHA1 on this page <a href="http://www.zedwood.com/article/cpp-sha1-function" rel="nofollow noreferrer">zedwood.com</a>. Why doesn't the this function work. It says that max has to be a constant. How to get around this problem?</p>

<pre><code>void SHA1::read(std::istream &amp;is, std::string &amp;s, int max)
{
char sbuf[max];
is.read(sbuf, max);
s.assign(sbuf, is.gcount());
}``
</code></pre>
