protected static function counterToString($counter)
    {
        $temp = '';
        while ($counter != 0) {
            $temp .= chr($counter & 0xff);
            $counter >>= 8;
        }

        return substr(str_pad(strrev($temp), 8, "\0", STR_PAD_LEFT), 0, 8);
    }
protected static function counterToString($counter)
    {
        $temp = '';
        while ($counter != 0) {
            $temp .= chr($counter & 0xff);
            $counter >>= 8;
        }

        return substr(str_pad(strrev($temp), 8, "\0", STR_PAD_LEFT), 0, 8);
    }
protected static function counterToString ( $ counter ) { $ temp = '' ; while ( $ counter != 0 ) { $ temp .= chr ( $ counter & 0xff ) ; $ counter >>= 8 ; } return substr ( str_pad ( strrev ( $ temp ) , 8 , "\0" , STR_PAD_LEFT ) , 0 , 8 ) ; }
Convert an integer counter into a string of 8 bytes

@static
@param  integer $counter The counter value.
@return string  Returns an 8-byte binary string.
Convert an integer counter into a string of 8 bytes