Hi,
Could someone please tell me the C++/Qt4 equivalent of this?
PHP CODE
$input_250="432345566180632659";
$input_Value=array();
//250 IN29
$dec = $input_250;
$byte = 8;
for($i=0;$i<$byte;$i++)
{
if($i>0)
{
$input_Value[$i] = gmp_mod(gmp_div_q($dec,gmp_pow(2, $i*8)),256);
}
else
{
$input_Value[$i] = gmp_mod($dec,256);
}
}
$input_250="432345566180632659";
$input_Value=array();
//250 IN29
$dec = $input_250;
$byte = 8;
for($i=0;$i<$byte;$i++)
{
if($i>0)
{
$input_Value[$i] = gmp_mod(gmp_div_q($dec,gmp_pow(2, $i*8)),256);
}
else
{
$input_Value[$i] = gmp_mod($dec,256);
}
}
To copy to clipboard, switch view to plain text mode
I'm storing the $input_250 in Qt in a QByteArray.
This number is represented as a longlong .
Any help would surely be appreciated! 
BR,
Pedro Doria Meunier
Bookmarks