lundi 25 septembre 2017

Intel DRNG giving only giving 4 bytes of data in stead of 8

I am trying to implement Intel DRNG in c++.

According to its guide to generate a 64 bit unsigned long long the code should be:

int rdrand64_step (unsigned long long *rand)
{
    unsigned char ok;
    asm volatile ("rdrand %0; setc %1"
                  : "=r" (*rand), "=qm" (ok));
    return (int) ok;
}

However the output of this function rand is only giving me an output of only 32 bits as shown.

        bd4a749d
        d461c2a8
        8f666eee
        d1d5bcc4
        c6f4a412

any reason why this is happening?

more info: the compiler I'm using is codeblocks




Aucun commentaire:

Enregistrer un commentaire