increment_counter example

if ($plen > $fill) {
                # memcpy( S->buf + left, in, fill ); /* Fill buffer */                 for ($i = $fill$i--;) {
                    $ctx[3][$i + $left] = $p[$i + $offset];
                }

                # S->buflen += fill;                 $ctx[4] += $fill;

                # blake2b_increment_counter( S, BLAKE2B_BLOCKBYTES );                 self::increment_counter($ctx, 128);

                # blake2b_compress( S, S->buf ); /* Compress */                 self::compress($ctx$ctx[3]);

                # memcpy( S->buf, S->buf + BLAKE2B_BLOCKBYTES, BLAKE2B_BLOCKBYTES ); /* Shift buffer left */                 for ($i = 128; $i--;) {
                    $ctx[3][$i] = $ctx[3][$i + 128];
                }

                # S->buflen -= BLAKE2B_BLOCKBYTES;                 $ctx[4] -= 128;

                
if ($plen > $fill) {
                # memcpy( S->buf + left, in, fill ); /* Fill buffer */                 for ($i = $fill$i--;) {
                    $ctx[3][$i + $left] = $p[$i + $offset];
                }

                # S->buflen += fill;                 $ctx[4] += $fill;

                # blake2b_increment_counter( S, BLAKE2B_BLOCKBYTES );                 self::increment_counter($ctx, 128);

                # blake2b_compress( S, S->buf ); /* Compress */                 self::compress($ctx$ctx[3]);

                # memcpy( S->buf, S->buf + BLAKE2B_BLOCKBYTES, BLAKE2B_BLOCKBYTES ); /* Shift buffer left */                 for ($i = 128; $i--;) {
                    $ctx[3][$i] = $ctx[3][$i + 128];
                }

                # S->buflen -= BLAKE2B_BLOCKBYTES;                 $ctx[4] -= 128;

                
Home | Imprint | This part of the site doesn't use cookies.